mIRC Homepage
I want to make a thing that you can type /locate [user/ip/host] and it will download the info from http://www.geobytes.com/IpLocator.htm and echo out the info something like this:

# Checking nick 'NICKNAME' (127.0.0.1)
#
# Locating NICKNAME (127.0.0.1)...
#
# Location: City, State, Country
# Nationality Singular: American
# Nationality Plural: Americans
# Time Zone: GMT +05:00
# Does not appear to be a proxy
#
# Data integrity: 99% Certin

It's just for me and not to give out...and i think this would be easier then going to the web page, I know ill have to use sockets, which I suck at, so all i need is the send request and the actual downloading of the file, and maybe some tips, and i can do the rest of the code on my own, thanks
you can try and socket to geektool.com's whois tool its alot better then others and it can tell you very specific info if u need it just one problem is the confirm number you will have to come up w/ a way to figur that out ;/
wtf? thats not even what i asked, I asked for a way to download the page
he answered your question.. you need to use a socket.
No he didnt!

Quote:
..."I know ill have to use sockets, which I suck at, so all i need is the send request and the actual downloading of the file"...
This is the request you tell the server.
Code:
 
POST /IpLocator.htm?GetLocation HTTP/1.1
Host: www.geobytes.com
Content-Length: 14

text=127.0.0.1
 


Note: Some webservers need more information than this, read up on the Hypertext Transfer Protocol and add them

Ok, anyways ...

POST is just post request, telling the server what page you want, and HTTP version.

Host is needed for 1.1, and the fact that most sites use that to redirect to the correct site (if they have many Domains on one IP/Computer)

Content-Length is the length in BYTES for the post data. (you can use $len to calculate this)

Note that the EMPTYLINE is needed (after Content-Length and before the postdata)

-----

Have fun...

PS: I haven't tested this, it should work.
But even if it doesn't work you should be able to fix it reading up on the protocol.
It might be worth considering that the site says "no_bots_pls" 20 times. (In html source)
© mIRC Discussion Forums