<?php
/*
* test_http.php
*
* @(#) $Header: /home/mlemos/cvsroot/http/test_http.php,v 1.18 2008/02/24 05:06:30 mlemos Exp $
*
*/
?>
<?php
require("http.php");
set_time_limit(0);
$http=new http_class;
$http->timeout=0;
$http->data_timeout=0;
$http->debug=1;
$http->html_debug=1;
$http->user_agent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
$http->follow_redirect=1;
$http->redirection_limit=5;
$http->exclude_address="";
$http->prefer_curl=0;
$arguments["ProxyHostName"]="195.75.146.237"; //working
$arguments["ProxyHostPort"]=80;
....
.... bla bla bla..
$error=$http->Open($arguments);
if($error=="")
{
$error=$http->SendRequest($arguments);
if($error=="")
{
$data='';
for(;;){
$error=$http->ReadReplyBody($body,1000);
if($error!="" || strlen($body)==0)
break;
$pdata.= $body;
}
echo $pdata;
}
}
$http->Close();
?>
I browse http://localhost/proxy2/test_http.php?link=http://www.youtube.com/watch?v=tEJnVQuAPTw then it gives output below
S and C started lines.
...... encoded html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
......
</script><br />
<br />
<br />
<br />
</html><br />
Good html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
.....
......
GOOOD HTML I want only this part
.............
</html>Disconnected from www.youtube.com<br />
I want to get unblocked youtube video streams for custom flv players.
I hacked youtube video player is using only video id and t value it browses
youtube.com/get_video?video_id=$Vid ... this is url type
I will use this sytem in custom flv player embed script like this
s1.addVariable("file","http://www.youtubekaydet.com/proxy2/urlal.php?v=ggk3CLI_gNs");