# Get geo targeting with php and flash

**URL:** <https://forum.kirupa.com/t/get-geo-targeting-with-php-and-flash/292113>\
**Category:** Uncategorized\
**Created:** [July 10, 2009, 8:27am UTC](https://forum.kirupa.com/t/get-geo-targeting-with-php-and-flash/292113 "2009-07-10T08:27:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniel\_mihalcea](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@daniel\_mihalcea](https://forum.kirupa.com/u/daniel_mihalcea)\
**Post date:** [July 10, 2009, 8:27am UTC](https://forum.kirupa.com/t/get-geo-targeting-with-php-and-flash/292113/1 "2009-07-10T08:27:56Z")

</div>

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

```php

<?php
$myIP = gethostbyname(trim(`hostname`));

$xmlstring = file_get_contents ( "http://api.hostip.info/?ip=".$myIP);

echo $xmlstring;
?>

```

With this ip: 10.80.27.192 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.
