![]() |
|
[PHP] Block all useragent except one - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Web Development (https://hackforums.net/forumdisplay.php?fid=183) +---- Thread: [PHP] Block all useragent except one (/showthread.php?tid=5334848) |
Block all useragent except one - 3yZtwglFSCUs - Jul 11, 2016 Hello can someone help me with this i want to block all useragents except one which is "Globelexic 2.7" PHP Code * - Chickendipper - Jul 11, 2016 PHP Code * - 3yZtwglFSCUs - Jul 11, 2016 (Jul 11, 2016 04:25 AM)Chickendipper Wrote: page still showing :( * - Kylos - Jul 11, 2016 (Jul 11, 2016 04:32 AM)3yZtwglFSCUs Wrote: page still showing :( Try using exit after header? * - 3yZtwglFSCUs - Jul 11, 2016 it's perfect :D if ($_SERVER['HTTP_USER_AGENT'] !== "Globelexic 2.7") { header('HTTP/1.0 404 Not Found'); exit; } |