online hiscores --mysql database
Open a TCP/IP stream to the server, probably on port 80, and send:
POST /somescript.pl HTTP/1.1
Host: www.somewhere.com
User-Agent: <probably the name of your program here>
Content-length: <how many bytes of data we''re sending>
<-- blank line.
<-- blank line.
<the data you wanted to send>
The server should return:
HTTP/1.1 <number> <some text>
<stuff you can ignore>
If that number is in the range of 200-299, then all is well. 400-499 would indicate and error.
Content-type: application/x-www-form-urlencoded
is a likely choice.
... *goes to research tcp/ip streams
quote:
Original post by smart_idiot
Say you wanted to post something to www.somewhere.com/asdf.pl
Open a TCP/IP stream to the server, probably on port 80, and send:
POST /somescript.pl HTTP/1.1
Host: www.somewhere.com
User-Agent: <probably the name of your program here>
Content-length: <how many bytes of data we''re sending>
<-- blank line.
<-- blank line.
<the data you wanted to send>
The server should return:
HTTP/1.1 <number> <some text>
<stuff you can ignore>
If that number is in the range of 200-299, then all is well. 400-499 would indicate and error.
99% correct, you just had one too many new lines (Not that it probably matters, but still..). HTTP Spec specifies TWO \n as the header-section terminator, but each header is terminated by a \n, so you only need one additional new line after the one that terminates the last header.
Content-type: text/html\n\n
quote:
Original post by Ruudje
though the above sounds much more interesting, maybe take a look at mysql++ ?
that looks good .. although id rather send the scores to a script and use mysql++ for reading the scores.
thanx for the replies
I''m curious because I''m interested in something similar myself.
Reverse Engineering?
I imagine it''d probably be pretty easy to find out what the program is telling itself to find the script.
[edited by - smart_idiot on January 2, 2004 1:56:33 AM]
smart_idiot << EEK! I have been lookin for the http request header for some time now! Copy/pased ;P
As _buu_ pointed out I made a mistake. I was thinking two newlines made two blank lines, but it only makes one.
501 Method Not Implemented Method Not Implemented
to / not supported.
Invalid method in request
</body></html>
¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨d¨„
any ideas on what is causing this madness?
[edited by - penguins on February 8, 2004 5:59:54 PM]
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.