Results 1 to 10 of 11
-
15th Oct 2012, 02:55 PM #1OPMember
PHP cURL help needed
I need the HTTP header of this link
Code:http://www.dailymotion.com/cdn/H264-320x240/video/xucehg.mp4?auth=1350479679.4161f93bd3590e4816bddb233bd025df
PHP Code:function curlheaders($link)
{
$ch = curl_init($link);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_NOBODY, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4');
$headers = array(
'Connection: keep-alive',
'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Encoding: gzip,deflate,sdch',
'Accept-Language: en-US,en;q=0.8',
'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3'
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
$page = curl_exec($ch);
return($page);
curl_close($ch);
}
echo curlheaders('http://www.dailymotion.com/cdn/H264-320x240/video/xucehg.mp4?auth=1350479679.4161f93bd3590e4816bddb233bd025df');
warezrock Reviewed by warezrock on . PHP cURL help needed I need the HTTP header of this link http://www.dailymotion.com/cdn/H264-320x240/video/xucehg.mp4?auth=1350479679.4161f93bd3590e4816bddb233bd025df Here is the code i used.. function curlheaders($link) { $ch = curl_init($link); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_NOBODY, 1); Rating: 5Can Do :-
PSD TO ANY CMS | PHP(Dynamic Site) | MySql | Script Customization | cUrl Related Work
Pm me for more info ;)
-
15th Oct 2012, 03:08 PM #2MemberWebsite's:
imdber.org justpaste.meWhy do some `curl_setopt()` use a different handler? $ch, $curl, $your_resource
-
15th Oct 2012, 03:21 PM #3OPMember
-
15th Oct 2012, 03:28 PM #4Respected MemberWebsite's:
DL4Everything.com Soft2050.in^
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($your_resource, CURLOPT_HTTPHEADER, $headers);
These variables are not defined, it should be $ch
As for forbidden, the response headers are same when viewed through browser. Check the url / you probably need to send some cookies / login before
-
15th Oct 2012, 03:34 PM #5OPMember
^
Sorry, code updated.Still doesn't work.
Ok, looking the site for cookies but i think its not needed to access that page because it return a 302 redirect .Can Do :-
PSD TO ANY CMS | PHP(Dynamic Site) | MySql | Script Customization | cUrl Related Work
Pm me for more info ;)
-
15th Oct 2012, 03:37 PM #6MemberWebsite's:
sborg.usCheck the link properly, it has "auth=1350479679.4161f93bd3590e4816bddb233bd02 5df"
That means the link also checks for your session. In this case, it just shows me a blank page if I try to visit that link via Firefox.
V3g3ta | Halcyon | Abhi
-
15th Oct 2012, 03:42 PM #7Respected MemberWebsite's:
DL4Everything.com Soft2050.in
-
15th Oct 2012, 04:02 PM #8OPMemberCan Do :-
PSD TO ANY CMS | PHP(Dynamic Site) | MySql | Script Customization | cUrl Related Work
Pm me for more info ;)
-
15th Oct 2012, 04:06 PM #9MemberWebsite's:
sborg.usCoz you've not closed the browser + cleared your cookies.
Also, in the response there's a link re-director "Location" which gives you the new link that you need to curl to.
V3g3ta | Halcyon | Abhi
-
15th Oct 2012, 05:17 PM #10OPMemberCan Do :-
PSD TO ANY CMS | PHP(Dynamic Site) | MySql | Script Customization | cUrl Related Work
Pm me for more info ;)
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Need Help In cURL Progressbar
By saninokia in forum Web Development AreaReplies: 20Last Post: 20th Jan 2012, 08:14 AM -
Curl url file (I need help)
By spanero in forum Web Development AreaReplies: 3Last Post: 22nd Dec 2011, 04:23 PM -
[PHP] Log into WUpload using CURL
By _Vick in forum Web Development AreaReplies: 0Last Post: 25th Nov 2011, 06:58 AM -
Curl IPB help
By xwarlordx in forum Web Development AreaReplies: 3Last Post: 23rd Aug 2011, 06:33 AM -
Php cUrl Help Needed
By warezrock in forum Web Development AreaReplies: 3Last Post: 4th Aug 2011, 11:51 PM
themaLeecher - leech and manage...
Version 5.03 released. Open older version (or...