mIRC Home    About    Download    Register    News    Help

Print Thread
Make post request, download page, process page... #81065
28/04/04 06:25 AM
28/04/04 06:25 AM
Joined: Feb 2003
Posts: 79
A
Ancyker Offline OP
Babel fish
Ancyker  Offline OP
Babel fish
A

Joined: Feb 2003
Posts: 79
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

Re: Make post request, download page, process page #81066
28/04/04 10:29 AM
28/04/04 10:29 AM
Joined: Dec 2002
Posts: 397
A
ATMA Offline
Fjord artisan
ATMA  Offline
Fjord artisan
A

Joined: Dec 2002
Posts: 397
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 ;/


Need amazing web design for low price: http://www.matrixn3t.net
Re: Make post request, download page, process page #81067
29/04/04 06:05 AM
29/04/04 06:05 AM
Joined: Feb 2003
Posts: 79
A
Ancyker Offline OP
Babel fish
Ancyker  Offline OP
Babel fish
A

Joined: Feb 2003
Posts: 79
wtf? thats not even what i asked, I asked for a way to download the page

Re: Make post request, download page, process page #81068
29/04/04 06:14 AM
29/04/04 06:14 AM
Joined: Aug 2003
Posts: 325
W
Wolfie Offline
Fjord artisan
Wolfie  Offline
Fjord artisan
W

Joined: Aug 2003
Posts: 325
he answered your question.. you need to use a socket.

Re: Make post request, download page, process page #81069
29/04/04 07:16 AM
29/04/04 07:16 AM
Joined: Feb 2003
Posts: 79
A
Ancyker Offline OP
Babel fish
Ancyker  Offline OP
Babel fish
A

Joined: Feb 2003
Posts: 79
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"...

Re: Make post request, download page, process page #81070
29/04/04 12:44 PM
29/04/04 12:44 PM
Joined: Apr 2004
Posts: 9
S
slartibartfast Offline
Nutrimatic drinks dispenser
slartibartfast  Offline
Nutrimatic drinks dispenser
S

Joined: Apr 2004
Posts: 9
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.

Re: Make post request, download page, process page... #81071
29/04/04 03:23 PM
29/04/04 03:23 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Iori  Offline
Hoopy frood
I

Joined: Aug 2003
Posts: 1,831
It might be worth considering that the site says "no_bots_pls" 20 times. (In html source)