Using Curl_multi for processing multiple URLs


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

I am at a loss as to how to implement this. I would like to be able to automatically assign a number of urls taken from a file to x amount of curl_multi handles determined by the user on the form, so if i had 100 urls, and the user types 2 threads, each handle will process and go through 50 urls each.

The problems I face are how do I get php to create the number of handles based on the users' preference, are variable variables the only way? Because I really don't want to go there as my head will explode.

Also, how do I ensure that thread A can not process urls that Thread B is currently working on? Could this be done by popping the url off an array just before the thread goes to work on it?

Many thanks

No comments posted yet

Your Answer:

Login to answer
71 Like 52 Dislike
Previous forums Next forums
Other forums

Confused with Loop
guys, i got confused with Looping...this is the case

I have 3 stocks, let say "Stock A&q

show the direct link into href
I want to display link on the page. i am fetching the data(URL) from database,actually before that i

login box shows up again after logging in 2nd login works
Hello,

I am having trouble on my site Lockerz.rack111.com where when you login the login box

check if value exists
I have googled this for a while and I am getting lots of different results. Is there a standard meth

Simple program to copy files between two computers over the web
I use logmein free and often need to move files between my two computers. Generally, I move the file

problem with script manager
Hi iam using Net.2005.I have created ajax enabledwebsite.i have master page in which i have script m

Calculating n! using vector
#include
#include
#include

using

Saving PHP output as a file
I wondered if anyone knows how to save the rendered output of a PHP script as a file?

I have

for some reason mysql query not working, not inserting, please check it out
This code is not inserting anything into my db, don't know why, the $_SESSION variable does contain

check comment for html
hi, I just wanted to check if a comment a user posts contains HTML, and if it does, to not allow it

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash