Why i Canot make curl of this url?
////////////////// i has try to use file_get_conetents//////// <? $test = "http://220.181.23.202/s1/rpxiBVe6lybzimWQ/cdceabe1e4f1f901fb677c2ce64fb950/1246778125/v4/2006/mv/200750/11719752251z5ok.flv?ref=out"; $res = file_get_contents($test); echo $res; ?> //////////////////// and i use curl here //////////////////// <? function get($url1){ if(!isset($timeout)) $timeout=30; $curl = curl_init(); if(strstr($referer,"://")){ curl_setopt ($curl, CURLOPT_REFERER, $referer); } curl_setopt ($curl, CURLOPT_URL, $url1); curl_setopt ($curl, CURLOPT_TIMEOUT, $timeout); curl_setopt ($curl, CURLOPT_USERAGENT, sprintf("Mozilla/%d.0",rand(4,5))); curl_setopt ($curl, CURLOPT_HEADER, (int)$header); curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($curl, CURLOPT_SSL_VERIFYPEER, 0); $res = curl_exec($curl); curl_close($curl); return $res; } $test = "http://220.181.23.202/s1/rpxiBVe6lybzimWQ/cdceabe1e4f1f901fb677c2ce64fb950/1246778125/v4/2006/mv/200750/11719752251z5ok.flv?ref=out"; $content = get($test); echo $content; ?> ////////////////////////////and i use fopen//////////////////// <? $test = "http://220.181.23.202/s1/rpxiBVe6lybzimWQ/cdceabe1e4f1f901fb677c2ce64fb950/1246778125/v4/2006/mv/200750/11719752251z5ok.flv?ref=out"; $handle = fopen("$test", "rb"); $contents = ''; while (!feof($handle)) { $contents .= fread($handle, 8192); } fclose($handle); echo $contents; ?> |
-
dvduval -
Thanks
SignatureIt is okay to contact me! I have been developing software since 1999, creating many popular products like phpLD.{{ DiscussionBoard.errors[946192].message }} -
-
GB2008 -
[ 1 ] Thanks - 1 reply
SignatureGary Bailey{{ DiscussionBoard.errors[946397].message }}-
hotscode -
Thanks
{{ DiscussionBoard.errors[948414].message }} -
-
-
GB2008 -
Thanks
SignatureGary Bailey{{ DiscussionBoard.errors[948977].message }} -
-
hotscode -
Thanks
{{ DiscussionBoard.errors[959381].message }} -
-
eddiejames -
[ 1 ] Thanks
{{ DiscussionBoard.errors[960393].message }} -
-
hotscode -
Thanks
{{ DiscussionBoard.errors[960484].message }} -
-
GB2008 -
Thanks
SignatureGary Bailey{{ DiscussionBoard.errors[960700].message }} -
-
hotscode -
Thanks
{{ DiscussionBoard.errors[964385].message }} -