Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>So I have three possible solutions for you.</p> <ol> <li><p>Check for URL errors and make sure the actual web page is specified. Its common reason for a web site to return the 403 Forbidden error, when the URL is pointing to a directory instead of a web page. Which can be done using HttpRequest Class in PHP. You can use <a href="http://us2.php.net/manual/en/function.http-get.php" rel="nofollow">http_get</a> to perform GET request. You can also <a href="http://web-sniffer.net/" rel="nofollow">Test URL here</a>.</p> <pre><code>&lt;?php $response = http_get("URL", array("timeout"=&gt;1), $info); print_r($info); ?&gt; </code></pre> <p>Output:</p> <pre><code>array ( 'effective_url' =&gt; 'URL', 'response_code' =&gt; 403, . and so on ) </code></pre> <p>What is important for you is response_code with which you can play further.</p></li> <li><p>Use of curl.</p> <pre><code>function http_response($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, TRUE); curl_setopt($ch, CURLOPT_NOBODY, TRUE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); $head = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if(!$head) { return FALSE; } return $httpCode; } $errorcode = http_response("URL"); //if success 200 otherwise different </code></pre></li> <li><p>If you're sure the page you're trying to reach is correct, 403 Forbidden error message may be a mistake. Then you can only do two things either contact webmaster or use your own customize redirection. To do that add following line in .htaccess file and handle that error in forbidden.php</p> <pre><code>ErrorDocument 403 /forbidden.php </code></pre></li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload