PHP Glype Proxy Youtube Plugin Update
Posted: Fri Jun 18, 2010 4:11 am
hey, i was wondering if someone here could please update the youtube.com.php plugin for glype, here is the code - it currently dosnt work, i belive that the praseing needs to be reworked, witch is over my head please help me out thanks.
heres a link to the proxy - http://www.glype.com/downloads/fetch/proxy/53
and heres a link to the plugin - http://www.mediafire.com/?ohkjynm2ngy
thank you
Code: Select all
<?php
##############################################
# Plugin: YOUTUBE.COM
##############################################
/* ABOUT ---------------------------------
/ This plugin replaces the default YouTube video player
/ with our own player that loads the flv file through
/ the proxy.
-----------------------------------------*/
##########################################
# STOP ENCODING TO PREVENT PROBLEMS
##########################################
$options['encodePage']=false;
##########################################
# REMOVE NON-WORKING FLASH OBJECTS
##########################################
$options['stripFlash']=true;
##########################################
# EXTRA PARSING AFTER MAIN PROXY PARSER
##########################################
function postParse($html,$type){
if($type=='html'&&preg_match('/fullscreenUrl\s\=\s.*video\_id\=(.*)\&.*\&t\=(.*)\&/i',$html,$matches)){
$thumbid_arr=explode('&',basename($matches[1]));
$thumbid=array_shift($thumbid_arr);
$html=preg_replace('#<div id="watch-checker-div">(.*)to.write\("watch-checker-div"\);#is','<embed src="'.optURL.'videoplayer.swf" width="480" height="395" allowscriptaccess="always" allowfullscreen="true" flashvars="height=395&width=480&file='.proxifyURL('http://youtube.com/get_video?video_id='.$matches[1].'&t='.$matches[2]).'&image='.proxifyURL('http://i.ytimg.com/vi/'.$thumbid.'/0.jpg').'&backcolor=0x000000&frontcolor=0xCCCCCC&lightcolor=0x996600&searchbar=false&type=flv" menu="false" />'.'<script type="text/javascript">',$html);
}
return $html;
}
?>and heres a link to the plugin - http://www.mediafire.com/?ohkjynm2ngy
thank you