Hatem Ben wrote:
$url = "http://myserver.com";
$sockhandle = @fsockopen($url, 80, &$errno, &$errstr);
if(!$sockhandle) {
$mes = "server $url not available!";
$result = "<center><h5>$mes</h5></center>";
return $result;
} else {
$request = "GET / HTTP/1.1\r\n";
$request .= "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows
98)\r\n";
$request .= "Host: $url\r\n";
$request .= "Connection: Close\r\n\r\n";
fputs($sockhandle, $request);
$res = "";
$line = fgets($sockhandle, 1024); //Request Method
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //Close Method
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //Server Type
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //Date
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //Transfer-Encoding
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //Content-Type
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //Cache-control
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //Set-Cookie
$res .= "$line\n";
$line = fgets($sockhandle, 1024); //End Header "space"
$res .= "$line\n";
$res = addslashes($res);
return $res;
----- Original Message -----
From: "Leif K-Brooks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, December 15, 2002 4:54 PM
Subject: [PHP] Getting full HTTP request the page was requested with?
Is there a way to find out exactly what HTTP request was made for aunauthorized attempt to decrypt it will be prosecuted to the full extent of
page? Something like:
GET http://myserver.com/whatever.php HTTP/1.1
Host: myserver.com
--
The above message is encrypted with double rot13 encoding. Any
the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.