I'm trying to code a robot and some how the remote servers finds out it's not a real user and redirect my robot. So I made three files to catch the diff in the header I'm sending.
the first one is a server scirpt which displays $_SERVER values.
Code:
<?
print("User : $_POST[user]<br>Passw : $_POST[pass]<br><br>");
foreach($_SERVER as $key => $value){
print("<b>$key</b> = $value<br>");
}
?>
The second one is a Form I use to send info via a real post :
Code:
<body>
<form id="form1" name="form1" method="post" action="Server.php">
<label>
<input type="text" name="user" id="user" />
</label>
<input type="password" name="pass" id="pass" />
<input type="submit" name="button" id="button" value="Submit" />
</form>
</body>
which returns :
Code:
HTTP_HOST = myfhg.com
HTTP_USER_AGENT = Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
HTTP_ACCEPT = text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
HTTP_ACCEPT_LANGUAGE = en-us,en;q=0.5
HTTP_ACCEPT_ENCODING = gzip,deflate
HTTP_ACCEPT_CHARSET = ISO-8859-1,utf-8;q=0.7,*;q=0.7
HTTP_KEEP_ALIVE = 300
HTTP_CONNECTION = keep-alive
HTTP_REFERER = http://myfhg.com/Lab/Form.php
HTTP_COOKIE = __utma=234929437.1319266469.1195355793.1200011167.1200017816.198; __utmz=234929437.1197320899.89.2.utmccn=(organic)|utmcsr=google|utmctr=myfhg.com|utmcmd=organic; __utmc=234929437
HTTP_CACHE_CONTROL = max-age=0
CONTENT_TYPE = application/x-www-form-urlencoded
CONTENT_LENGTH = 37
PATH = /sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE =
SERVER_SOFTWARE = Apache
SERVER_NAME = myfhg.com
SERVER_ADDR = 72.55.179.76
SERVER_PORT = 80
REMOTE_ADDR = 70.80.131.22
DOCUMENT_ROOT = /home/www
SERVER_ADMIN = root@localhost
SCRIPT_FILENAME = /home/www/myfhg.com/Lab/Server.php
REMOTE_PORT = 55452
GATEWAY_INTERFACE = CGI/1.1
SERVER_PROTOCOL = HTTP/1.1
REQUEST_METHOD = POST
QUERY_STRING =
REQUEST_URI = /Lab/Server.php
SCRIPT_NAME = /Lab/Server.php
PHP_SELF = /Lab/Server.php
REQUEST_TIME = 1200020756