What I want to do is update high-scores from one of my work-in-progress games and display them on my web site. Let's say I've mastered using sockets in PHP and have a PHP file that's supposed to catch the game users' connection.

The question is, how do I initiate that particular PHP file from my C program? the address of my site (ip) only points to the site server. I havent been able to find anything useful so far on how to pull this off.
Posted on 2003-02-19 22:42:42 by gregd
The simple solution would be to forget PHP sockets and simply send the server a HTTP request in the form of

GET /highscore.php?mode=update&user=Test&score=1000

If that isn't secure enough, you could use authentication as well, though that would complicate the request a bit.

If you really want to have PHP handle this, you'd have to have a PHP file running permanently, which doesn't sound like a good idea to me. You'd have to turn off tons of timeouts in PHP and server configuration.
Posted on 2003-02-20 00:12:56 by Qweerdy