Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Communicating with php and mysql

Author
Message
Dritt
18
Years of Service
User Offline
Joined: 10th Jan 2006
Location:
Posted: 19th Nov 2008 17:09
Hi.

Can you communicate with php and mysql? I want to send and receive data from my php scripts on my website.

Lets say a player wants to submit his score to a high score table on my site, how would i do this?

The only command i know wich can communicate with the internet is "execute file", wich can open websites. I can send and receive data this way, but how do i check if the user has entered the correct value. If a user where to login to the game using a username, then data must be sent back to dbo telling him if the username is correct or not.

I would really appricate any feedback.
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 19th Nov 2008 18:17 Edited at: 21st Nov 2008 16:07
You can use the FTP commands for Highscore, but they aren't really secure. (it exposes username and password, if someone uses a packet sniffer)

There are a few mysql plugins... you can try searching the forum.

I'll do a quick check to see if I turn up anything.


Mysql
Here is a link to Cattlerustler's Mysql plugin
Use the download button in Cr's post, as his site in his sig is down.

PHP
And finally I found a thread on using urlmon to pass data to a PHP script.

And here is a simple usage case of utilizing urlmon.





===============================================
[edit]
Moved mistakes (thanks benjamin for correcting them) I made in the above to down here.
Quote: "zenassem: (as is with the urlmon below)."
- referring to insecure username/password

Quote: "zenassem: From what I can gather it would have the same security issues as FTP in exposing the username and password (even if it's encrypted in the source code), if one used a packet
sniffer."


"When I look at that square... I wish FPSC noobs would stay on their side of the forums and stop polluting these boards." - Benjamin
Dritt
18
Years of Service
User Offline
Joined: 10th Jan 2006
Location:
Posted: 21st Nov 2008 09:43
Thank you very much for all your help zenassem, you have been very kind. This seems a little to advanced for me at the moment, but i will have another look at it. In the meantime i will using Blitz3D's TCP/IP and UDP commands, not that i'm saying Blitz is better in any way so dont get me wrong, but it allready have the function to do what i'm after.
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 21st Nov 2008 12:22
Quote: "From what I can gather it would have the same security issues as FTP in exposing the username and password (even if it's encrypted in the source code)"

The difference being that you wouldn't need to transmit any kind of username or password if you use the urlmon method.

zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 21st Nov 2008 15:59
Quote: "The difference being that you wouldn't need to transmit any kind of username or password if you use the urlmon method."


Thanks for pointing that out Benjamin! And I tried so hard to get that info right. lol

I'll edit that out of the main part of the post So that others that read up to that point don't get confused. I'll move those comments to the bottom for continuity sake.

"When I look at that square... I wish FPSC noobs would stay on their side of the forums and stop polluting these boards." - Benjamin
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 21st Nov 2008 16:03

Login to post a reply

Server time is: 2024-11-25 14:55:41
Your offset time is: 2024-11-25 14:55:41