Sure , here is the code that I am using to post the message onto the guestbook. It seems to timeout everytime I try posting it. I do get some reply but it always ends with a timeout. Sorry about the late reply BTW.
1
2
3
4
56
7
8
9
1011
12
13
14
1516
17
18
19
2021
22
23
24
2526
27
28
29
30 |
<?php
$callserv = fsockopen("10.201.13.50",80); //This is the proxy server at my university. Opening a socket to it.
$out1 = "POST http://www.wechall.net/challenge/guestbook/index.php HTTP/1.1\r\n".
"Host: www.wechall.net\r\n".
"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729)\r\n".
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n".
"Accept-Language: en-us,en;q=0.8,ko-kr;q=0.5,mr;q=0.3\r\n".
"Accept-Encoding: gzip,deflate\r\n".
"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n".
"Proxy-Authorization: Basic (blah blah blah)==\r\n". //These are my credentials. So removing them.
"Proxy-Connection: keep-alive\r\n".
"Content-Type: application/x-www-form-urlencoded\r\n".
"Content-Length: 39\r\n".
"\r\n";
"message=Hello+World&sign=Sign+Guestbook";
//$out2 = "";
if(!$callserv){
echo "Sorry";
return;
}
else {
fwrite($callserv,$out1);
}
while (!feof($callserv)) {
echo fgets($callserv);
}
fclose($callserv);
?>
|
It gets time out everytime I try to post something. This is the error message :
1
2
3
4
56
|
( ! ) Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\socket1.php on line 26
Call Stack
# Time Memory Function Location
1 0.0186 369376 {main}( ) ..\socket1.php:0
|
I was wondering why a request as the above would take so much time, while it posts properly from the browser in a very short time.