full credit due to
http://proxy.org/forum/1198884211.html
origionally for phproxy at above link -- modified for glype
its probably not the most efficient / correct way of doing it
though I do not like doing things the 'right' way so much (for example to version of glype on my server is 1 file - 1 line of code - ~14 kb in size with literally most of the code in the official release stripped but leaving all usefullness that i could figure would be used)
<?
function preParse($html,$type) {
if($type!='html')
return $html;
preg_match('/fullscreenUrl\s\=\s(.*)\&sk\=/', $html, $matches);
preg_match('/video\_id\=(.*)/',$matches[1],$matches);
$link = proxifyURL('http://youtube.com/get_video?video_id='.$matches[1],'');
$s[] = '/var v = "7";(.*?)player_div\);/is';
$r[] = '';
$s[] = '#\/\/ \<\!\[(.*?)\/\/ \]\]\>#is';
$r[] = "
var p = new SWFObject('
http://gtfomy.biz/mediaplayer.swf','...9;,'7');
p.addParam('allowfullscreen','true');
p.addVariable('file','$link');
p.addVariable('backcolor','0x000000');
p.addVariable('frontcolor','0xCCCCCC');
p.addVariable('lightcolor','0x996600');
p.addVariable('overstretch','true');
p.addVariable('type','flv');
p.addVariable('volume','50');
p.write('playerDiv');";
$html = preg_replace( $s, $r, $html);
return $html;
}
function postParse($html,$type) {
return $html;
}
?>