/**
* Configuration
*/
$SITEMAPDIR = "./"; // Where to put new sitemaps
/**
* No changes needed below this line
* ==================================================================================
*/
/**
* This file receives the newly created sitemaps
* by www.freesitemapgenerator.com
*
* Please do not make any changes
*
*
* (c) 2005 www.freesitemapgenerator.com
*
* This product comes with ABSOLUTELY NO WARRANTY, to the extent
* permitted by applicable law.
*
* Use at own risk, we cannot be held responsable for any damages
* caused directly or indirectly by installing this sofware.
*
*/
$FSG_VERSION = "0.92"; // fsg-upload version
$FSG_UNIQUEID = "a01144d7990f375d80092094876b0baf"; // unique identifier
/**
* Act like a 404 page if FSG_UNIQUEID is incorrect or method is not POST
*/
if (sizeof($_POST) != 4 || $_POST["uniqueid"] != $FSG_UNIQUEID)
{
/**
* Produce 404 error message
*/
header("HTTP/1.1 404 Not Found");
echo "
".
"
404 Not Found".
"".
"
404 Page not found
".
"Go to the
Homepage".
"
".
$_SERVER[SERVER_SIGNATURE].
"";
die();
}
/**
* Check version
*/
if ($_POST["minversion"] > $FSG_VERSION)
{
/**
* We need to upgrade!
*/
error_log("fsg-update.php: You need to upgrade to a newer version of fsg-update.");
echo "error=101\n";
die();
}
/**
* Verification succeeded, now time to save data
*/
$outfile = $_POST["file"];
/**
* remove slashes from file, just to make sure
*/
$outfile = str_replace("/", "", $outfile);
if (substr($outfile, 0,7) != "sitemap")
{
error_log("fsg-upload.php: eeks. upload of $outfile tried");
echo "error=103";
die();
}
if (array_key_exists("gzdata" , $_POST))
{
/**
* Using compressed data
*/
if (function_exists("gzuncompress"))
{
error_log("Compressed upload! (" . strlen($_POST[gzdata]) . " bytes)");
$outdata = gzuncompress($_POST[gzdata]);
if (strlen($outdata) == 0)
{
echo "error=104";
die();
}
}
else
{
/**
* We cannot handle compressed data
*/
error_log("Compressed upload failed ...gzuncompress() not supported");
echo "error=104";
die();
}
}
else
{
/**
* Assume normal ASCII data
*/
$outdata=$_POST["data"];
}
$outdata = str_replace("\\", "", $outdata);
$fp = @fopen($SITEMAPDIR . "/" . $outfile, "wb");
if (!$fp)
{
/**
* File permissions ?
*/
error_log("fsg-upload.php: Could not write to $SITEMAPDIR/$outfile");
echo "error=100";
die();
}
@fwrite($fp, $outdata);
@fclose($fp);
/**
* Write done!
*/
error_log("fsg-upload.php: Received OK '$outfile'");
echo "error=0";
die();
?>
امتیاز : |
|
نتیجه : 26 امتیاز توسط 6 نفر مجموع امتیاز : 6 |
|
نمایش این کد فقط در ادامه مطلب
بازدید : 936
تاریخ : یک شنبه 6 / 11 / 1391 زمان : 19:55 |
نویسنده : خانم باران نفیسی |
لینک ثابت |
نظرات ()