LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help redirecting blocked user to page (https://www.linuxquestions.org/questions/linux-newbie-8/help-redirecting-blocked-user-to-page-706410/)

landysaccount 02-21-2009 09:02 AM

Help redirecting blocked user to page
 
Hello.

I recently did a simple php script that will write certain users' mac address to a file which is then taken by another script that would block those mac addresses and will not let them go to the internet. Now I would like to add something else to it:

I would like to redirect users with the mac addresses to a certain page when they try to go to the internet so, they would know they're blocked from using the internet for any reason.

How can that be accomplished?

Thanks in advanced for your help.

win32sux 02-21-2009 11:10 AM

Quote:

Originally Posted by landysaccount (Post 3452263)
Hello.

I recently did a simple php script that will write certain users' mac address to a file which is then taken by another script that would block those mac addresses and will not let them go to the internet. Now I would like to add something else to it:

I would like to redirect users with the mac addresses to a certain page when they try to go to the internet so, they would know they're blocked from using the internet for any reason.

How can that be accomplished?

Thanks in advanced for your help.

Example:
PHP Code:

if ($BadMAC)
   {
   
header("Location: ./access_denied.php")
   }; 

Keep in mind this would need to happen before any output is sent - see here.


All times are GMT -5. The time now is 08:22 PM.