Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Curl Website Help Needed
Old 08-01-2009, 02:20 PM Curl Website Help Needed
Junior Talker

Posts: 1
Name: eugene
Trades: 0
hi everyone i have this problem which i cannot get the right link to download it seems encoded when i use the curl when i click on the website link to go in i can download the file can anyone slove this ? is this something to do with the useragent ? And can i know how do i make it download manually into the serverit self ? from tube8 ?

please advise thanks in advanced
PHP Code:
$userAgent ='# IE 6 - Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)';
$url "http://www.tube8.com/hardcore/hot-girl-****ed-by-two-cocks/164977/";
$ch curl_init();    // initialize curl handle
curl_setopt($chCURLOPT_URL,$url); // set url to post to
curl_setopt($chCURLOPT_USERAGENT$userAgent);
curl_setopt($chCURLOPT_FAILONERROR1);
//curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects
//curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable
curl_setopt($chCURLOPT_TIMEOUT3); // times out after 4s
//curl_setopt($ch, CURLOPT_POST, 1); // set POST method
//curl_setopt($ch, CURLOPT_POSTFIELDS, "url=index%3Dbooks&field-keywords=PHP+MYSQL"); // add POST fields
$result curl_exec($ch); // run the whole process
curl_close($ch); 
echo 
$result
baddot is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-03-2009, 08:16 AM Re: Curl Website Help Needed
Novice Talker

Posts: 13
Trades: 0
Probably something to do with the referring URL not being set, or a cookie not being in place. Check out how to set those with curl and try again.
premiumscripts is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Curl Website Help Needed
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13261 seconds with 12 queries