comparison doc/www.powerfulproxy.com/public_html/do_it.php @ 504:83bc7f6e03ae draft

bug fix in powerfulproxy
author Nick <nick@somerandomnick.ano>
date Wed, 11 May 2011 05:49:51 +0000
parents 1ca0de1bb813
children c2879679114d
comparison
equal deleted inserted replaced
503:1ca0de1bb813 504:83bc7f6e03ae
8 if (count($pall) <= 1) die('Unexpected path format'); 8 if (count($pall) <= 1) die('Unexpected path format');
9 array_shift($pall); 9 array_shift($pall);
10 $proto = array_shift($pall); 10 $proto = array_shift($pall);
11 $host = array_shift($pall); 11 $host = array_shift($pall);
12 $hostparts = explode('.', $host); 12 $hostparts = explode('.', $host);
13 if (ip2long(long2ip($host))===$host) { 13 if (long2ip(ip2long($host))===$host) {
14 if ($hostparts[0]!='1') die('Bad IP'); 14 if ($hostparts[0]!='1') die('Bad IP');
15 } elseif (!preg_match("/ano|ntwrk$/",array_pop($hostparts))) die('Bad host'); 15 } elseif (!preg_match("/ano|ntwrk$/",array_pop($hostparts))) die('Bad host');
16 $path = implode('/', $pall); 16 $path = implode('/', $pall);
17 array_pop($pall); 17 array_pop($pall);
18 $rp = implode('/', $pall); 18 $rp = implode('/', $pall);