1
The javascript code below works perfectly in the HTML of my site. It is a geo-target server that shows the city based on user IP.
<script src='http://promos.fling.com/geo/txt/location.php?testip='></script>
What I’m trying to do and I can’t get it to work inside a link that I want to be generated according to the person’s city. Like:
<a href="http://www.example.net/?q=Belo Horizonte">Belo Horizonte</a>
I tried to make it work the way below but the answer at the end of the URL, after ?q=
is the code itself. I tried this way:
<a href="http://www.example.net/?q=<script src='http://promos.fling.com/geo/txt/location.php?testip='></script>">Belo Horizonte</a>
I’m a little layy on this subject so any solution be it in PHP or javascript would be welcome. Thanks in advance!
You can explain better what you want to do, or better: what should happen when the user clicks the link? Is this detection being made in PHP? , you can put that geo-target code here?
– Sergio