<?php //file1.php
$url = 'http://www.google.com';
echo '<a href=./goto.php?goto=' . bin2hex($url) . '>click to go</a>';
?>
<?php //goto.php
//http://www.w3schools.com/TAGS/ref_urlencode.asp
//frame wrapper for redirect to php
$goto = @$_GET['goto'] ;
//echo $goto;
echo '<frameset rows="100%" >
<frame src="./redirect.php?goto=' . $goto . '" noresize="noresize" />
</frameset>';
?>
<?php //redirect.php
function hex2bin($h)
{
if (!is_string($h)) return null;
$r='';
for ($a=0; $a<strlen($h); $a+=2) { $r.=chr(hexdec($h{$a}.$h{($a+1)})); }
return $r;
}
$goto = @$_GET['goto'];
if ($goto != '')
{
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: " . hex2bin($goto) );
}
?>
Wednesday, 25 August 2010
Subscribe to:
Post Comments (Atom)
Labels
- ahk (1)
- android (1)
- apache (1)
- cifs (1)
- cygwin (2)
- E17 (1)
- gOS (1)
- grldr (4)
- grub (4)
- linux (5)
- mp4 (4)
- mysql (2)
- mytv (5)
- mytv download (5)
- php (2)
- pidgin (1)
- pxe (1)
- rtmp (7)
- rtmpdump (1)
- rtmpe (5)
- samba (1)
- sed (5)
- ssed (4)
- tvb (1)
- tvb.com (6)
- tvb.com.hk (6)
- ubuntu (2)
- virtualbox (1)
- winflp (1)
- xargs (1)
No comments:
Post a Comment