Results 1 to 3 of 3

Thread: how to grab and store executed value of url using php

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Talking how to grab and store executed value of url using php

    Hi all i got a url(http://map.geoup.com/geoup?template=CountryName) that if i paste it in browser address bar it will return for me a value like this:
    document.write('usa');
    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 :

    <script language="Javascript" src="http://map.geoup.com/geoup?template=CountryName"></script>

    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

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: how to grab and store executed value of url using php

    PHP Code:
    $countryName $_GET['template'];
    echo 
    $countryName
    will replace the JS...

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Re: how to grab and store executed value of url using php

    Quote Originally Posted by penagate
    PHP Code:
    $countryName $_GET['template'];
    echo 
    $countryName
    will replace the JS...
    Many thanks for u reply . could u tell where i need to call the url from within php and execute it ? i be happy if explain to me .thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width