Page 1 of 1

preg_match [help]

Posted: Wed Aug 16, 2006 6:42 am
by spamyboy
Did I made any mistakes here ?

Code: Select all

$url="http://www.468x60.lt/refer.php?5556";
preg_match("/^(https?:\/\/)?([^\/]*)(.*)/i", "$url", $matches);
$domain = "http://" . $matches[2];
$page = $matches[3];
$fd = fopen($domain.$page, "rb");
$code = "";
while(!feof($fd)){
$code .= fread($fd, 4096);
}
fclose($fd);
$start= strpos($code, "5556,"); 
$finish= strpos($code, "\"><img"); 
$length= $finish-$start;
$code=substr($code, $start, $length);
Couse I get this

Code: Select all

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@warez.vhost.lt and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.36 Server at www.warez.vhost.lt Port 80

Posted: Wed Aug 16, 2006 6:55 am
by JayBird
Look in your server error log for more information

Posted: Wed Aug 16, 2006 7:02 am
by spamyboy

Code: Select all

[Wed Aug 16 14:59:34 2006] [error] [client 85.206.53.168] File does not exist: /home/spamyboy/public_html/500.shtml
[Wed Aug 16 14:59:34 2006] [error] [client 85.206.53.168] Premature end of script headers: /home/spamyboy/public_html/index.php
my script doesnt request's that file, but what does this mean:

Code: Select all

[Wed Aug 16 14:59:34 2006] [error] [client 85.206.53.168] Premature end of script headers: /home/spamyboy/public_html/index.php