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

LOOPing Problem
Hello All!

The following code loops through the data and displays the data accordingly. My p

Delete all files in folder except with certain name
I have a script that I want to delete all files in a folder (taken from a database) except for one n

Attempt to assign property of non-object in...
I'm having issues with the following function in PHP 5...

function getTreeWithChildre

understanding functions and classes
Code: [Select]
class person {
var $name = "Jimmy Goe";

function get_nam

Curl timeout breaks script
So im having difficulties with skipping timeout error in curl
my script calls different functions

Query failed issue with php script but works fine in mssql manager!
hi i have the script below which copies data from one table to another but will only insert new data

Simple PHP/Java Help..
Hi,
I'm trying to build a little program to do with calculating postage. Unfortunately i haven't

FAGL_FC_TRANSLATION FAS52 New GL ECC 6.0
Hello,

The new program for Translating GL Balances (FAS 52) gives the option to use diffe

private constructor
Hello,

Can we create a constructor as private? If yes, what is the use of it? If no, why can'

php multiple action on submit
I have a form which says:

<form enctype='multipart/form-data' method='post' action='pr

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