/ Published in: PHP
[quote]$_SERVER['HTTP_REFERRER']'s problem is that can be spoofed, but it's better than nothing if you really want that.[/quote]
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
if ($_SERVER['REQUEST_METHOD'] == 'POST') // or possibly, count($_POST) > 0 { if ($host AND $_SERVER['HTTP_REFERER']) { $refhost = $refparts['host'] . ((int)$refparts['port'] ? ':' . (int)$refparts['port'] : ''); { } } }
URL: http://www.namepros.com/2996502-post8.html