Had to use an IP code today, thought I may as well put it here:

Flash (mySWF.swf):
code:
loadVariables("myip.php?r="+Math.random(), _root);
onData = function() {
trace(ip);
};



PHP (myip.php):
PHP Code:
<?php
    
echo 'ip='.$_SERVER['REMOTE_ADDR'];
?>