Files
Testing/vidchat/report_snapshot_upload.php
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

27 lines
664 B
PHP

<?php
//this file is called by index.swf when a report is made
$siteId = $_GET["siteId"];//user's id as sent by the siteID var in avc_settings.xxx
$type = $_GET["type"];//snapshot type (text-chat snapshot or camera snapshot);
//make the folder if it's missing
if(!file_exists("report_snaps")){
mkdir("report_snaps",0777);
}
//check for malicious $type values
if($type!="TEXT.jpg" && $type !="CAM.jpg"){
die("save=failed");
}
$image = fopen("report_snaps/".$siteId."_".$type,"wb");
if ($image){
if (fwrite($image , file_get_contents("php://input"))){
fclose($image);
echo "save=ok";
}else{
echo "save=failed";
}
}else{
echo "save=failed";
}
?>