Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-28-2011, 09:48 PM   PM User | #1
Diemux
New to the CF scene

 
Join Date: May 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Diemux is an unknown quantity at this point
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.
Diemux is offline   Reply With Quote
Old 02-28-2011, 10:18 PM   PM User | #2
chump2877
Senior Coder

 
chump2877's Avatar
 
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,530
Thanks: 15
Thanked 128 Times in 121 Posts
chump2877 is on a distinguished road
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.
chump2877 is offline   Reply With Quote
Reply

Bookmarks

Tags
php, regex, url

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:22 AM.


Advertisement
Log in to turn off these ads.