rednax Posted July 28, 2008 Share Posted July 28, 2008 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!! Quote Link to comment Share on other sites More sharing options...
trq Posted July 28, 2008 Share Posted July 28, 2008 <?php echo basename('http://www.domain.com/user/r3dn4x'); ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.