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

my two tables
table1 : col1 = topicid , col2 = topic

table2 : col1 = sentid, col2 = sentence

Cod

Inserting Data into a MS Access DB using PHP.
As part of my uni course I am doing a placement at a company whom want me to create a client zone fo

filesize() returns 0
I have a socket program that runs in an infinite loop, listening for connections, in this socket I h

How to Create a Dynamic table
col1 col2 date1 date2 date3 date4..........
a b v1 v2 v3 v4

Table control is disappearing from Screen
Hi Experts,

I have a screen with multiple table control(TC). Each table control has two c

unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_
Can anyone view my code and tell me why im getting the error:
Parse error: syntax error, unexpect

IF STATEMENT HELP
Hi
i have created a calendar from a table:

Code: Calendar: October 2009
<table w

What is SAP Avatar ?
Hi All,

This G.Satish , my boss asked me to explore on SAP Avatar. I searced in internet

MySQL query problem
When I try to run the following piece of code, I get this error:
QuoteWarning: mysql_query(): sup

Ignore html and bbcode?
I've created a function to limit the amount of text according to the amount of words.

However

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