get your IP address in GP!

Extending or modifying the GP system itself (advanced!)

Moderator: MSandro

Post Reply
MSandro
Posts: 162
Joined: Jul 26th, '17, 21:12

get your IP address in GP!

Post by MSandro » Aug 26th, '17, 09:14

This is a small "extension" to get your IP address in GP.
I am using my own server to host a small PHP file wich I can check in GP.

Code: Select all

<?PHP
echo $_SERVER['REMOTE_ADDR'];
?>
my IP.PNG
myIP
my IP.PNG (7.52 KiB) Viewed 14180 times
If you want to use this, you have to do it by yourself because it is currently not posible to export classes.
Last edited by MSandro on Aug 27th, '17, 08:21, edited 1 time in total.

SimpleSi
Posts: 330
Joined: Jul 2nd, '17, 13:47

Re: get your IP address in GP!

Post by SimpleSi » Aug 26th, '17, 20:40

JFI - class exporting is broke at moment (JM knows about it)

your code looks like this is in a text editor

Code: Select all

defineClass myIP morph


script 'myIP' 50 50 {
to f_557053637335203 {}
}

script 'myIP' 95 206 (f_557053637335203)


MSandro
Posts: 162
Joined: Jul 26th, '17, 21:12

Re: get your IP address in GP!

Post by MSandro » Aug 27th, '17, 10:27

Thank you for this information, I've removed the attachement.

JohnM
Posts: 379
Joined: Sep 11th, '15, 14:42

Re: get your IP address in GP!

Post by JohnM » Sep 14th, '17, 21:13

This is very cool! But not everyone is set up to run a PHP server, so I looked around to see if there was some public website that does what your PHP server does. After a bit of searching, I found a one.

Using that server, here's a little expression that returns your public IP address:
Screen Shot 2017-09-14 at 5.11.20 PM.png
Thanks for the inspiration!

P.S. I'm working on the class exporting bug.

Post Reply