Jump to content

Variable from SERVER['HTTP_REFERER']


sprinjee

Recommended Posts

When doing echo $_SERVER['HTTP_REFERER'] I see the information:

[a href=\"http://www.koenvissers.nl/survey/survey.php?uid=14482e0bec0181&linkcode=Ef0004\" target=\"_blank\"]http://www.koenvissers.nl/survey/survey.ph...linkcode=Ef0004[/a]

How can I extract Ef0004 from $_SERVER['HTTP_REFERER']?
Link to comment
https://forums.phpfreaks.com/topic/11177-variable-from-serverhttp_referer/
Share on other sites

This is not going to work if there are any small differences in the URL.
You should use true regex.

If you tell me what you expect linkcode to be (what is it's length? alphanumeric only? is it always in the end of the URL) I can give you a regular expression...

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.