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

help with image upload code
Hello,

right now this code I have resizes images and then places them into the uploads folder

Setting a default timezone?
I have read about how to change the timezone in PHPMYADMIN, but it changes back, it doesn't STAY the

HTML form problem
Ive made a form to that i want to send to my email via PHP. but when it send only the name's etc sen

Firewall / visited websites logger
Hi. I have a firewall implementation and I want to log all the websites visited on the machine. S

Working with Dates, help.
Sooo to make a long story short, here's what im trying to accomplish.

I need to create a drop

insert PHP code into function
Hi,
I'm having problems when trying following:

I have:
Code: [Select]createBar("Do

Phase Error I can't seem to find :(`
Hey guys, I can seem to find my phase error on this. I am getting this error

[error]
Pars

Combining Two Queries
I have two scripts that each work fine by themselves. One is a search script with a variable that de

Login Functionality Working Different on IE
This is an odd one, I have a site which has an admin section. The admin pages unsurprisingly require

Anti Spam Code
Ok where do i start? Probably by telling you I have very little working knowledge of PHP and that I

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