Jump to content

Grabbing last part of a url...


rednax

Recommended Posts

I'm not sure how to go about this...

 

I'll be taking the http_referrer on a page and I want the last chunk of the URL - if that makes sense. Example:

 

HTTP_REFERRER will be http://www.domain.com/user/r3dn4x

 

I need r3dn4x from that string, so how can I remove everything before it? Maybe just the regex(?) to grab everything after user/ and spit it back to me?

 

Any help would be greatly appreciated!!

Link to comment
https://forums.phpfreaks.com/topic/117055-grabbing-last-part-of-a-url/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.