Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete part of the value of a variable?

Status
Not open for further replies.
You can use the parse_url function to get just the host name.

$ref= parse_url($HTTP_SERVER_VARS['HTTP_REFERER']);

echo $ref[host]; // will output
Look at the PHP manual URL functions for full detail

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top