syariscrewz
Jul 5th 2009, 3:35 am
////////////////// 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;
?>
please can someone tell me what must i do to grab the contents
<?
$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;
?>
please can someone tell me what must i do to grab the contents