Posts: 684
Threads: 64
Joined: May 2004
First: Is there a way to open a socket from a url like "forum.qbasicnews.com" and the like? Basically, how would I get the IP from a domain name?
Second: Is there a way to download an HTML file off of the internet using sockets?
quote="Deleter"]judging gameplay, you can adaquately compare quake 4 with pong[/quote]
Posts: 3,522
Threads: 189
Joined: Dec 2003
Yes, see the winsock example, it's not the best, but it shows how you connect to a website and obtain it's content.
Posts: 6,419
Threads: 74
Joined: Mar 2002
The DNS server will resolve the IP for you, given a domain name. Plus what Z!re said
Posts: 33
Threads: 1
Joined: Apr 2006
plus there is an example for sdl_net that do what the two abowe sead lol
lt;_[_[_[_T-B-B-W_]_]_]_>
Posts: 961
Threads: 81
Joined: Apr 2005
Trust me, I've looked over that WinSock example and got a headache. Perhaps someone more experienced can make an example library or wrapper to handle all the stuff for us.
Let's say, I want to connect to
http://www.qbasicnetwork.com. I could use a command like:
Code:
ConnectURL "address"
or,
Code:
DownloadFile "address" "destination path"
Similarly, an UploadFile command could be introduced, such as:
Code:
UploadFile "address", "username", "password", ftpport as integer, overwrite as integer
Is something simple like this too much to ask?
On this, when connecting to an IP for a server program counterpart, something like:
Code:
ConnectIP "xxx.xxx.xxx.xxx", port
SendData whatever as combined string
Thoughts?
Screwing with your reality since 1998.
yeah, i'm sure eventually if noone else does it, i'll make a wrapper to make it real easy like that and i'll release it, cause i wanna make mmo's like everyone else, ya know? =p
Posts: 961
Threads: 81
Joined: Apr 2005
Serious? That would be wicked.
Screwing with your reality since 1998.
Posts: 33
Threads: 1
Joined: Apr 2006
dude if u play around with the winsock example for a few days u wuld know how to use it tbh.
just read thru the code a few times.
put print here and there to see what path the code follows.
also to read the .bi file wuld not hurt
lt;_[_[_[_T-B-B-W_]_]_]_>