
-----------------------------------
Afrog2
Wed Jan 18, 2006 4:22 pm

Turing and php?
-----------------------------------
Is it possible for my game (in turing) to send the users name and score to a php script witch will then put it into a mysql database? If there is can someone please tell me? I'm very interested in doing thing. And i'm not interested in having it connect to the server through an IP and have a program be running on the server. I just need it from any computer into a php script.

-----------------------------------
Delos
Wed Jan 18, 2006 6:33 pm


-----------------------------------
Hi and welcome.

Asking questions to which there are easily found answers is never a good thing.  Bah.  [url=http://www.compsci.ca/v2/viewtopic.php?t=10800]Never tried it.  PM the creator if it doesn't work/you need explanations.

Enjoy your stay.

-----------------------------------
Afrog2
Wed Jan 18, 2006 8:06 pm


-----------------------------------
I currently have 4.0.4c and so does my school :(. The online is needed, but my teacher said he'd like to see it work. Please help some how.

-----------------------------------
jrblast
Wed Jan 18, 2006 9:47 pm


-----------------------------------
Well, its not an official way or anything like that, but you could make the program go to a specific site, with variables in the name...

www.domain.com/phpscript.php?username=name&score=score

I think that would work, but I may be wrong, try it?

-----------------------------------
Afrog2
Wed Jan 18, 2006 9:59 pm


-----------------------------------
Thats the thing, I don't know how :S. Can anyone come up with a way by tomorrow? I've tried EVERYTHING that I know. I honestly can't get it.

-----------------------------------
jrblast
Wed Jan 18, 2006 10:33 pm


-----------------------------------
Thats the thing, I don't know how :S. Can anyone come up with a way by tomorrow? I've tried EVERYTHING that I know. I honestly can't get it.
I believe the command:

NET.OpenURLConnection

Will do the trick, read up on that, then play around with it a bit, let me know if you get it to work.

-----------------------------------
Afrog2
Wed Jan 18, 2006 10:43 pm


-----------------------------------
I might have said that wrong :S. I know how to use the net stuff, but how would the php script look like? and how do i get turing to export the varibles so taht php can read it?

-----------------------------------
md
Wed Jan 18, 2006 11:01 pm


-----------------------------------
Thats the thing, I don't know how :S. Can anyone come up with a way by tomorrow? I've tried EVERYTHING that I know. I honestly can't get it.
I believe the command:

NET.OpenURLConnection

Will do the trick, read up on that, then play around with it a bit, let me know if you get it to work.
That would open a connection to the http server, you'd still need to know the http protocol enough to request a page... way more effort then it's worth for this.

-----------------------------------
MysticVegeta
Wed Jan 18, 2006 11:37 pm


-----------------------------------
I agree with cornflake, way too much work than needed, if you read the tutorials first line, it says: "First question to ask yourself is if you really need it online?"

-----------------------------------
Afrog2
Thu Jan 19, 2006 9:34 am


-----------------------------------
Well, no, but i'm also planing to put it up for download on my site, we are all gamers, and there's a section there where you can submit games. And if I can get this working, then it'll be amazing! It also helps when I plan on doing stuff like an archive of downloads, but being able to view the pages in turing. Can someone give me an example of how this submitting of the highscores will work? Someone had once told me that you could tell it to go to a url, and the php script will read the url and the information. So it would be like this:
netStream := Net.OpenURLConnection (http://www.sitehere.com/highscores.php?name=name_var&score=score_var)


Would that work? I have the php knowlage to do it. But would that work?
