10-22-2007, 08:59 AM
|
#2 (permalink)
|
|
The Prestige
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
|
This is how to use cURL to grab a file
PHP Code:
/*First we Initialize a new cURL session and pass in our url, then it returns a cURL handle */ $ch = curl_init("http://www.blahblah.com/file.txt");
/*We must set CURLOPT_RETURNTRANSFER to true otherwise it just farts it out to screen instead of putting it into $file when we run curl_exec()*/ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
//Execute and put contains in $file $file = curl_exec($ch);
//close the cURL session curl_close($ch);
Hope that helps
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
Last edited by sketchMedia : 10-22-2007 at 09:27 AM.
Reason: spelling error
|
|
|
|