konkhra Posted May 11, 2012 Report Posted May 11, 2012 Avand codul php de mai jos as dori sa stiu cum pot face POST request, pentru cele 3 site-uri simultan, folosind variabilele parsate prin functia "my_request" ? Multumesc anticipat.<?require("RollingCurl.php");function my_request($response) { ............... ...............(variabile parsate pentru folosirea in request-ul POST) ............... ...............}$urls = array("http://www.site_01.com", "http://www.site_02.com", "http://www.site_03.com");$rc = new RollingCurl("my_request");$rc->window_size = 3;foreach ($urls as $url) { $request = new RollingCurlRequest($url, "GET"); $rc->add($request);}$rc->execute();?> Quote
Nytro Posted May 11, 2012 Report Posted May 11, 2012 Pff, nu imi place cum e facuta libraria, exemplul http://rolling-curl.googlecode.com/svn/trunk/example_groups.php nu cred ca te ajuta.Foloseste curl simplu, cu curl_multi_exec. Quote
Zatarra Posted May 12, 2012 Report Posted May 12, 2012 Te pisi pe el rolling curl, skipuie prea multe requesturi. Nu incurajez folosirea lui, oricum fiecare cu decizia lui. Quote