manintan13
New Member
- Messages
- 6
- Reaction score
- 0
- Points
- 0
I have an anti-image-theft script that has been working for months, but when I uploaded it to the X10Hosting server, it quit working. I removed the "@" before the include() function, and commented out the content-type header to see the php error message, but there was only a single character: a question mark. I don't know what could be messed up. I've include()d and require()d things bellow the document root all though my site, and it has worked just fine. And the script shouldn't need a GD library, because it worked on a server that didn't have one. It worked with PHP4 & PHP5. Does anyone have any ideas?
PHP:
<?php
//(c) http://0gb.us/
session_start();
header('Content-Type: image/png');
header('Cache-Control: public');
header('Pragma: public');
if(isset($_SESSION['REMOTE_ADDR']) && $_SESSION['REMOTE_ADDR'] == $_SERVER['REMOTE_ADDR'] && isset($_GET['png']) && !preg_match('"/"', $_GET['png']))
{ @include("{$_SERVER['DOCUMENT_ROOT']}/../../PNG/{$_GET['png']}.png"); }
else
{ include("{$_SERVER['DOCUMENT_ROOT']}/../../PNG/Hotink.png"); }
?>