The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 16, 2019, 11:15:07 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Multi Curl Class  (Read 4446 times)
jsp123
Rookie
**
Offline Offline

Posts: 20


View Profile
« on: October 24, 2007, 11:16:17 AM »

I have outgrown single curl and would like to know if anyone know how to use this multicurl class... http://webuildspam.com/code/class.Curl.phps.  Some docs for it can be found here http://www.blackhat-seo.com/2007/curl-multi-class-php5/ .

Here is one of my attempts:

Code:
Code:
<?php
include_once "curl.php";

$c = new Curl;

function 
printbody($data) {
echo $data['body'];
}

$urls = array('http://www.google.com/','http://www.yahoo.com/');
$t $c->make($urls,'','printbody');
$c->perform($t);

?>


Anyways if anyone has a small working example to get me running it would be very much appreciated, or even a point in the right direction.

Thanks!

Jsp
Logged

No links in signatures please
esrun
Rookie
**
Offline Offline

Posts: 24


View Profile
« Reply #1 on: October 26, 2007, 02:44:25 AM »

Whipped something up for you quickly: http://www.esrun.co.uk/blog/curl-multi-socket-example/
Logged
jsp123
Rookie
**
Offline Offline

Posts: 20


View Profile
« Reply #2 on: October 26, 2007, 11:08:19 PM »

Hey thanks esrun, just found your gmail account maker today also.  Cant wait to try them both out...

Thanks Alot!
Logged

No links in signatures please
jsp123
Rookie
**
Offline Offline

Posts: 20


View Profile
« Reply #3 on: October 27, 2007, 12:42:44 AM »

Update: Got my scraper reworked with multi, much easier than i thought. Woohoo Smiley
Logged

No links in signatures please
Plepco
n00b
*
Offline Offline

Posts: 1


View Profile
« Reply #4 on: November 01, 2007, 11:56:55 AM »

I've been struggling with multi-cURL myself, so it was nice to find this. You know, there are very few good examples or even any documentation about multi-cURL out there.

Thanks
Logged

No links in signatures please
meme
n00b
*
Offline Offline

Posts: 6


View Profile
« Reply #5 on: November 30, 2007, 09:29:58 AM »

Simple problem, make() doesnt take an array of urls. Check http://www.blackhat-seo.com/2007/curl-multi-examples/ for examples.
Logged

No links in signatures please
piratescurvy
Rookie
**
Offline Offline

Posts: 16


View Profile
« Reply #6 on: March 04, 2008, 08:55:42 AM »

Can someone re-host the multi curl class? or post it here?  Need Help

this is down:
http://webuildspam.com/code/class.Curl.phps   Sad


never mind.  found it in this thread.
http://www.perkiset.org/forum/php/class_multicurl-t419.0.html
« Last Edit: March 04, 2008, 09:12:46 AM by piratescurvy » Logged

No links in signatures please
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!