views:

168

answers:

1

Hi all i have the following:

$str = base64_encode(preg_replace("#\s|\r|\t|\n#", " ", file_get_contents("../www.cms.actwebdesigns.co.uk2/logged.php")));
if(preg_replace("#(PD9waHAg)((?!(Pz4g)).)*#is", $str, ))
{
    #print_r($matches);
    echo "<xmp>".base64_decode($matches[0]."Pz4g")."</xmp>";
}

now this works but i want to be able to use it for all occurrences on page. (finds php segments in page) So i used preg_match_all but returns a browser error (page has been moved or no longer exists) Anyone know why?

A: 

This is a real longshot, but I seem to recall some versions of Internet Explorer having a "feature" where so-called friendly error messages were be displayed for pages where:

  • an error status code (e.g. 404 Not Found) was returned, and
  • the actual HTML response was smaller than a certain number of bytes.

If your code was sending an error response already, and the change to preg_match_all() ended up shortening the output enough, it may have triggered the friendly error message.

If you're not using IE, or if your script is returning a non-error status code, then I have no idea what could be causing this.

David
well poo... lovely reply.. still going no where tho! thanks anyway.
Phil Jackson
p.s. testing on Chrome
Phil Jackson
Error 101 (net::ERR_CONNECTION_RESET): Unknown error.
Phil Jackson