/    Sign up×
Community /Pin to ProfileBookmark

how to grab and store executed value of url using php

Hi all i got a url([url]http://map.geoup.com/geoup?template=CountryName[/url]) that if i paste it in browser address bar it will return for me a value like this:
[B]document.write(‘usa’);[/B]

Note: the url is external url

I want to grab only countryname value using php and store it in variable and later insert it in to mysql db. Could an expert show me how i can store the countryname into variable.
My intention is that when a user visits my php page it writes his country name to mysql db so i want the url to be executed within my php and possibly i be print that value too. i be happy if show me how i can execute the url with in my php code.

if if use java script like this :

[B]<script language=”Javascript” src=”http://map.geoup.com/geoup?template=CountryName”></script>[/B]

it will print countryname alone for me but i do know if i can use this with in my php and some how set it up equal to
a varible.Thanks

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@bokehMar 30.2006 — You can't do it! That script relies on the location of the client (most probably the client IP) to work out the client location. It is not possible to replicate that from the server.

If you want IP to country information the easiest way is to download one of the numerous free databases like the one available from MaxMind.
×

Success!

Help @method spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...