# Very simple - PHP vars to Flash

**URL:** <https://forum.kirupa.com/t/very-simple-php-vars-to-flash/159756>\
**Category:** flash\
**Created:** [August 19, 2005, 9:25pm UTC](https://forum.kirupa.com/t/very-simple-php-vars-to-flash/159756 "2005-08-19T21:25:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aneurin\_Mark\_II](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/aneurin_mark_ii/32/1564_2.png) [@Aneurin\_Mark\_II](https://forum.kirupa.com/u/Aneurin_Mark_II)\
**Post date:** [August 19, 2005, 9:25pm UTC](https://forum.kirupa.com/t/very-simple-php-vars-to-flash/159756/1 "2005-08-19T21:25:56Z")

</div>

I want to print the user’s IP address in Flash via a PHP script, but keep getting an undefined variable (printed as “undefined”). Here’s my PHP script:

```php
<?php

// Script for getting IP
$yourip = $_SERVER['REMOTE_ADDR'];
echo ("yourip=".$yourip);

?>

```

And the Actionscript:

```auto
// Request user IP via PHP
loadVariables("scripts/getuserip.php", this);
statistics.stat_ip.text = "Your IP address is "+yourip;

```

statistics.stat.ip.text comes up as “Your IP address is undefined”…

I can tell there’s something blindingly obvious that I’m missing.
