skatecrazzy Posted May 5, 2009 Share Posted May 5, 2009 OK, so I'm new to PHP. If anyone can help me it would be GREATLY appreciated! I already set up a password protected area on my site using php. However, a web conferencing service I use cannot access password protected pages and I need it to. I am trying to run a string search and an If...Else statement (If referring HTTP includes "phrase" do nothing, Else require login.) Here's the code I have so far...what am I missing that the web conferencing program uses the "Else" not the "If"? Wont this work to search the referring url for "searchparameter"? <?php $referer = $_SERVER['HTTP_REFERER']; $pattern = '/^searchparameter/'; if (preg_match($pattern, $referer)) { ; } else { include("password_protection_file..."); } ?> Thank you so much for any help you may be able to provide! -skatecrazzy Link to comment https://forums.phpfreaks.com/topic/156912-search-referring-url-for-phrase-ifelse/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.