Login | Register

Global IP

November 22, 2006, 18:44 by Calle
[loading]
-->
To connect to someone, through mplay or whatever, you'll need his or hers global IP. The tricky thing with that, is that there are no function for this in GML. There is one called mplay_ipadress or something like that, but it will only return the local IP, which won't help you. I know of some different methods of getting the global IP, some for an example writes scripts that reads of a homepage that writes the global IP adress somwhere on the screen. Here I will show you how to make a homepage like this in PHP.

The PHP code is:
<?php
echo $_SERVER['REMOTE_ADDR'];
?>

And it should be inserted into a file with the extension .php ... then uploaded. When you download the file it will contain only your IP so it will be easy to read using GML. The downloading can be done in different ways, for an example using the 39dll.dll... look at the forum.

Good luck!

Comments

Loading comments... [loading]
.
Users logged in:

game maker articles, game maker examples, game maker tutorials, gmtutorials, game maker questions and answers, game maker crash course, how to create games