onesez
V2EX  ›  PHP

PHP CURL 循环执行

  •  
  •   onesez · Feb 7, 2017 · 4697 views
    This topic created in 3572 days ago, the information mentioned may be changed or developed.

    有什么好的方案吗, 我一般总是 curl_init-curl_close 这样循环执行,效率不高吧?、

    求高效方法

    5 replies  •  2017-02-14 19:56:27 +08:00
    batnss
    batnss
    Feb 7, 2017
    1
    https://github.com/php-curl-class/php-curl-class
    往下拉到:
    $multi_curl = new MultiCurl(); 这
    linpf
    linpf
    Feb 7, 2017
    2
    如果实时性不是要求很高,处理量也不是很大,单线程慢慢跑就行了。

    如果要求快速处理,就像楼上说的开多线程来异步处理。只不过异步的复杂度就高了。
    orderc
    orderc
    Feb 7, 2017
    3
    可以用 guzzle
    rekulas
    rekulas
    Feb 8, 2017
    4
    单线程 curl 效率?
    ribenren
    ribenren
    Feb 14, 2017 via iPhone
    5
    楼主威武
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1143 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 23:27 · PVG 07:27 · LAX 15:27 · JFK 18:27
    ♥ Do have faith in what you're doing.