Forum Moderators: coopster

Message Too Old, No Replies

Cause 403 error using PHP

How to cause 403 error using PHP?

         

anshul

7:12 am on Jun 18, 2005 (gmt 0)

10+ Year Member



How to cause 403 error using PHP?

I used this to create 401 error in members' only Web pages.

<?php
header('HTTP/1.0 401 Unauthorized');
?>

RonPK

9:26 am on Jun 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



More or less the same, actually:

header("HTTP/1.0 403 Forbidden");
echo "HTML here";

anshul

10:11 am on Jun 18, 2005 (gmt 0)

10+ Year Member



That's good. What we can code to return Web page temporarily unavailable ( I forgot code for that ;) thank you.

RonPK

11:24 am on Jun 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure what code that would be. You can find a list of status codes in chapter 10 [w3.org] of the HTTP1.1 specs, RFC 2616.