Computer Science Canada

Uploading a score to a server AND Changing mouse cursor

Author:  leepham [ Mon Mar 24, 2003 3:19 pm ]
Post subject:  Uploading a score to a server AND Changing mouse cursor

I'm writing a relatively simple program for school.
Just wondering if anyone can think of a way of writing a program that will upload a high score to server. I was thinking of using the "system" command to FTP into my server and grab the file, read it and so forth. But I couldn't get that working. Or, possibly reading from a webpage (which I'm having problems with, since my server uses a redirecter)... but even if I got it working, then how would I do the uploading part?

I was also wondering if there is a way to change the mouse cursor. To crosshair image or something along those lines.

Any help would be appreciated.
Lee Pham

Author:  Tony [ Mon Mar 24, 2003 4:33 pm ]
Post subject: 

for downloading part, just read the HTML for the data. You can open a webpage using Net.whatever (someone got to check the exact syntax if you chose to do that). Make sure none of your HTML words are over 255 chars in length, else it crashes. So you need to make sure you got spaces.

as for writing, just using CGI for uploading data (gotta learn c++ or another STDOUT enabled language for that). Then just read from page such as

Author:  leepham [ Mon Mar 24, 2003 4:55 pm ]
Post subject:  ...

Hmm... I like the idea about the uploading part. I know ASP so I use that to do it...
You guys don't have a tutorial here on the Net.Url thing do you... I'm having problems with it, if I link it to something like, it'll grab everything on the page... but if I try some other sites it doesn't work (might be 255 character thing)... on my server, it gets an empty page since I use a dynamic name server... any way around that? If all comes to worse, I'll just put a link to the site with the highscore on the program.

Also the mouse cursor thing?? Can I change it? I don't like the arrow!

Thanks for the help,
Lee Pham

Author:  Tony [ Mon Mar 24, 2003 5:47 pm ]
Post subject: 

you cant replace mouse image in turing... but you can draw a picture that follows your mouse Wink The pointer will still be there... but if the picture follows it some distance away, I dont think it will matter that much Confused

Author:  leepham [ Mon Mar 24, 2003 6:24 pm ]
Post subject:  ..

Thanks Tony, that's good to know...

1 more thing... I just finished writing up the idea you gave me earlier in regard to making a CGI page to upload the score... (i used ASP)
I got it working, so when I type it in a browser it'll work and update the score.
However, I've hit a probelm in TURING, when using this code:

netStream := Net.OpenURLConnection (url)

I'm wondering it's my DNS server? It won't open the url properly... it'll read a page, but it says the page is no diplayed correctly says, there is no website at this address. Anything you can suggest?

Lee Pham

Author:  Dan [ Mon Mar 24, 2003 6:40 pm ]
Post subject: 

well try using the progam at school or another place that uses a difrent internet set up. also the net comand in turing has never wroked peruftey Rolling Eyes

Author:  aesthetics [ Wed Jan 07, 2004 11:02 am ]
Post subject: 

somehow i cant get the Net.OpenURLConnection working, i get this error.

<META http-equiv="Content-Type" content="text/html" charset="iso-8859-1">
<TITLE>Timeout connecting to the server</TITLE>
<H1>Error - 504</H1>
<P><PRE>Timeout connecting to the server:</PRE></P>
<P><PRE> (80)</PRE></P>
<P><PRE>Reason: Timed out in connection to remote host.</PRE></P>

Author:  shorthair [ Wed Jan 07, 2004 11:08 am ]
Post subject: 

need the rihgt port
should be 110 i belive or 80

Author:  aesthetics [ Wed Jan 07, 2004 12:43 pm ]
Post subject: 

any other suggestions? tried to add :80 or :110 to the url doesnt work.

Author:  Dan [ Wed Jan 07, 2004 9:57 pm ]
Post subject: 

it looks like the error is more on the hosts end, what site are you trying to conect to?