Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Extract values from page URL

    Hey all,

    I'm struggling with the following situation. I want to extract the values from the URL currently in the browser. So, when somebody visits a page with the URL http://www.somedomain.com/xx-some-name-here I would like to extract the some-name-here and convert it to Some Name Here.

    I haven't worked with regex but I think thats what I need. Any help or pointers are appreciated.

  • #2
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,776
    Thanks
    19
    Thanked 155 Times in 146 Posts
    Check out http://www.php.net/manual/en/function.parse-url.php.

    PHP Code:
    parse_url($_SERVER['PHP_SELF'], PHP_URL_QUERY); 
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!


  •  

    Tags for this Thread

    Posting Permissions

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