Error 403 and iThemes Security
-
Hello, I have some PHP code to check if a specific file is available before displaying its content on a Google Map, and while iThemes Security is disabled it returns the proper HTTP code 200 for an existing file. When I activate iThemes Security it returns HTTP code 403 (forbidden). I have unchecked the plugin option “Disable Directory Browsing”, but the problem persists. Only by deactivating the plugin my code works as expected.
This is the code:
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec($ch); $headers = curl_getinfo($ch); curl_close($ch); $satus = $headers['http_code']; echo 'satus=' . $satus . '.';
For $url I have the full URL of an existing file, $satus should return 200 but returns 403.
Any ideas? Thank you very much.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Error 403 and iThemes Security’ is closed to new replies.