Get geo targeting with php and flash

Hello there. Does anyone know something about geo targeting with hostip? I have tried something like this:

$myIP = gethostbyname(trim(`hostname`));

$xmlstring = file_get_contents ( "".$myIP);

echo $xmlstring;

With this ip: and I receive this message " This is the Hostip Lookup Service hostip inapplicable (Private Address) (Private Address) XX " I am testing my script from localhost with xampp.
Anyone knows why I receive this message?
Thank you.