|
|
@ -45,11 +45,13 @@ $saveDir=$dirBaseDocuments.$_SESSION['paint_dir']; |
|
|
|
$contents = file_get_contents($urlcontents); |
|
|
|
$contents = file_get_contents($urlcontents); |
|
|
|
|
|
|
|
|
|
|
|
//Verify that the URL is pointing to a file @ pixlr.com domain or an ip @ pixlr.com |
|
|
|
//Verify that the URL is pointing to a file @ pixlr.com domain or an ip @ pixlr.com |
|
|
|
if (strpos($urlcontents, "pixlr.com") == 0 && strpos($urlcontents, "69.164.195.250") == 0 && strpos($urlcontents, "173.255.196.130") == 0 |
|
|
|
/* |
|
|
|
&& strpos($urlcontents, "173.255.196.177") == 0) { |
|
|
|
$urlcontents1='http://pixlr.com/'; |
|
|
|
echo "Invalid referrer"; |
|
|
|
$urlcontents2 = strstr($urlcontents, '_temp'); |
|
|
|
exit; |
|
|
|
$urlcontents_to_save=$urlcontents1.$urlcontents2; |
|
|
|
} |
|
|
|
$contents = file_get_contents($urlcontents_to_save);//replace line 45. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
//Verify that the file is an image |
|
|
|
//Verify that the file is an image |
|
|
|
$headers = get_headers($urlcontents, 1); |
|
|
|
$headers = get_headers($urlcontents, 1); |
|
|
|
$content_type = explode("/", $headers['Content-Type']); |
|
|
|
$content_type = explode("/", $headers['Content-Type']); |
|
|
|