it might be a cross-site scripting issue

you may get around it by writing a simple 'wrapper' php script on your
own webserver, which uses cURL to get the info and return it to your
js



On Aug 13, 8:03 pm, Bluesapphire <ahmadsaa...@gmail.com> wrote:
> Hi!
>     Iam using following JQuery Code:
>
> /***************************************************/
> <script type="text/javascript">
>
>   jQuery(document).ready(function(){
>
>                         jQuery.post(
>                                          'http://api.hostip.info/country.php'
>                                         ,{
>                                                  ip: '12.215.42.19'
>                                                 ,position : true
>                                          }
>                                         ,function(response){
>
>                                                         
> alert(response.Country);
>                                         }
>                                         ,'json');
>
>                         /*
>
>                         jQuery.post("http://api.hostip.info/country.php";, 
> function(data){
>                                         alert("Data Loaded: " + data);
>                         });
>                         */
>
>            });
>
> </script>
>
> /***************************************************/
>
> But Ima unable to get response from the link. When 'http://
> api.hostip.info/country.php' is typed in browser's address bar, it
> show location correctly, but in above jquery code it doesn't show
> anything.
>
> Can some one guide me, what Iam doing wrong.
>
> Thanks in advance.

Reply via email to