Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Uploading a score to a server AND Changing mouse cursor
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
leepham




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Mon Mar 24, 2003 4:33 pm   Post subject: (No 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

www.yoursite.com/cgi-bin/uploadscore.exe?username=tony&score=10000
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
leepham




PostPosted: 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 www.yahoo.com, 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
Tony




PostPosted: Mon Mar 24, 2003 5:47 pm   Post subject: (No 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
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
leepham




PostPosted: 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
Dan




PostPosted: Mon Mar 24, 2003 6:40 pm   Post subject: (No 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
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
aesthetics




PostPosted: Wed Jan 07, 2004 11:02 am   Post subject: (No subject)

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

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




PostPosted: Wed Jan 07, 2004 11:08 am   Post subject: (No subject)

need the rihgt port
should be 110 i belive or 80
Sponsor
Sponsor
Sponsor
sponsor
aesthetics




PostPosted: Wed Jan 07, 2004 12:43 pm   Post subject: (No subject)

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




PostPosted: Wed Jan 07, 2004 9:57 pm   Post subject: (No subject)

it looks like the error is more on the hosts end, what site are you trying to conect to?
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 10 Posts ]
Jump to:   


Style:  
Search: