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

Time-based image rotation script
I'm trying to write a PHP script that rotates an image based on what time of day it is. I want the

disabling a button server-side then re-enabling client-side breaks button postback
I have a tabbed container and a button (not in the container) on a page. If the first tab is selecte

i have no idea why this isn't working
Code: <?php
session_start();
include("connect.php");

error_reporting(E

Save remote XML to local website folder
Hi, I hope you can help me out. I would like to be able to pull an XML file from another site and t

Ariba 9r - SAP MM Integration
Hi experts,

The standard Ariba adapter for 9r creates a relationship between Cost Centers

Why does my php page download images over and over
Can anybody please explain to me why my php page keeps downloading the images and other items every

Strange php code found on my website
I got hacked and the following code was placed within my files:

Code: [Select]<?
/*

Is this Safe or Unsafe?
Hi i made a few pages with lots of peoples help now i just want to know if they are safe or not can

Parse XML
Good day,

I use oempro software and try to parse XMLReturn but it's not working for me, simpl

Comment Mod System Effects all rows...
Sorry if its confusing but here is whats going on: I have a table in a database called comments and

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