\";
echo \"
\";
echo \"


\";
echo \"
您的瀏覽器會(huì)在三秒鐘后自動(dòng)下載<\/div>\";
echo \"


\";
echo \"
或者點(diǎn)擊此處<\/a>下載<\/div>\";
echo \"


\";
echo \"<\/div>\";

\/\/echo $HTTP_ENV_VARS[\"PATH_INFO\"];
\/\/echo \"

国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Home Backend Development PHP Tutorial Multi-user file free upload voting system without database (2)_PHP tutorial

Multi-user file free upload voting system without database (2)_PHP tutorial

Jul 21, 2016 pm 04:02 PM
upload main Multi-user vote database document of system free

This is the download.php of this system, which is mainly responsible for downloading and counting. The file format is explained in the comments.



// Pass in num as the file number to be downloaded, col=column to be downloaded
//Add one to the number of ip downloads without timeout

//File format
//0Number<1 Author <2 File location<3 Voting count<4 Introduction<5 File size<6 Number of file downloads
//ip file format Address: Project: Time


$uploadto= "../uploadfile/".$col."/";//The subdirectory uploaded to
$cgiroot="http://eccct.51.net/cgi-bin/"; //Host plus current Directory

$pathtemp=explode("/",$HTTP_ENV_VARS["PATH_INFO"]);
$pathtemp[sizeof($pathtemp)-1]="";
$cgiroot=" http://".$HTTP_HOST.implode("/",$pathtemp);//Host plus current directory

$ipfile=$uploadto.$col.".ipd";//For downloading ip file
$overtime=4;//Timeout time hours

$goback="



The system will wait in 3 seconds Then return....
<script>setTimeout('location.href="view.php?col=".$col.""',3000)</script>";
$recfile=$uploadto.$col.".lst";


//Take out the ip file
$fp=@fopen($ipfile,"r") or die("Sorry about that The vote is illegal".$goback);
$ipinfo=fread($fp,filesize($ipfile));
fclose($fp);
unlink($ipfile);
$times =getdate();
$abstime=$times["yday"].sprintf("%02d",$times["hours"]);
//Absolute time




//Remove the timeout ip
$ip_times=explode("|",$ipinfo);
$temp="";
$ipinfo="";

for($i=0;$i
$ip=explode(":",$ip_times[$i]);
if($ip[1]==""||$ip[0]==""||$ip[2]=="") continue;
??????????????? eval ('$temp='.$abstime. '-'.$ip[2].';');

if($temp<$overtime&&$temp>=0){

$ipinfo.=($ip_times[$ i]."|");
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????;
$fp=@fopen($ipfile,"w") or die("An error occurred".$goback);
fwrite($fp,$ipinfo);
fclose($fp);
$firstdown=0;//First download
}
else{
$firstdown=1;//Not the first download

$ipinfo=$ipinfo.$ REMOTE_ADDR.":".$num.":".$abstime."|";

$fp=@fopen($ipfile,"w") or die("An error occurred".$goback) ;
fwrite($fp,$ipinfo);
fclose($fp);
}

//End of ip judgment







for($i=0;$i<100 && !file_exists($recfile);$i++);
if($i==99) die("System error 00".$goback);


$fp=@fopen($recfile,"r") or die("Sorry it's not legal".$goback);
$info=explode( ">",fread($fp,filesize($recfile)));
fclose($fp);
copy($recfile,$recfile.".bak");
unlink($ recfile);







for($i=0;$i
$items=explode("<",$info[$i]);
if(!trim($items[0])) continue;
if(trim($items[0] )==$num){//Items to be downloaded
if($firstdown)
$items[6]++;
$filepath=$uploadto.$items[2];
$info[$i]=implode("<",$items); ?????????????????????????????????????????????????????">",$info);

if(!$fp=fopen($recfile,"w")){
copy($votefile.".bak",$votefile);
die("Error 02".$goback);
}



for($i=0;$i if(trim($info[$i])!="") fputs($fp,trim($info[$i].">"));
}
????fclose($fp);


echo "";
echo "";
echo "";
echo "
";
echo "


";
echo "
您的瀏覽器會(huì)在三秒鐘后自動(dòng)下載
";
echo "


";
echo "
或者點(diǎn)擊此處下載
";
echo "


";
echo "
";

//echo $HTTP_ENV_VARS["PATH_INFO"];
//echo "<script>window.location.href='".$filepath."';window.close();</script>";

echo " ";

//header("Content-type: application/.rar");

//header("Content-Disposition: attachment; filename=".$filepath);
//Header("Location: ".$filepath);
//header("Content-Description: PHP3 Generated Data



?>

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/316394.htmlTechArticle這是本系統(tǒng)的download.php,主要負(fù)責(zé)下載和記數(shù),其中文件格式均在注釋中說(shuō)明. html ?php //傳入num為要下載的文件號(hào),col=要下載的分欄 //ip不超時(shí)...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Huawei's Qiankun ADS3.0 intelligent driving system will be launched in August and will be launched on Xiangjie S9 for the first time Huawei's Qiankun ADS3.0 intelligent driving system will be launched in August and will be launched on Xiangjie S9 for the first time Jul 30, 2024 pm 02:17 PM

On July 29, at the roll-off ceremony of AITO Wenjie's 400,000th new car, Yu Chengdong, Huawei's Managing Director, Chairman of Terminal BG, and Chairman of Smart Car Solutions BU, attended and delivered a speech and announced that Wenjie series models will be launched this year In August, Huawei Qiankun ADS 3.0 version was launched, and it is planned to successively push upgrades from August to September. The Xiangjie S9, which will be released on August 6, will debut Huawei’s ADS3.0 intelligent driving system. With the assistance of lidar, Huawei Qiankun ADS3.0 version will greatly improve its intelligent driving capabilities, have end-to-end integrated capabilities, and adopt a new end-to-end architecture of GOD (general obstacle identification)/PDP (predictive decision-making and control) , providing the NCA function of smart driving from parking space to parking space, and upgrading CAS3.0

iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos Jul 18, 2024 am 05:48 AM

Apple's latest releases of iOS18, iPadOS18 and macOS Sequoia systems have added an important feature to the Photos application, designed to help users easily recover photos and videos lost or damaged due to various reasons. The new feature introduces an album called "Recovered" in the Tools section of the Photos app that will automatically appear when a user has pictures or videos on their device that are not part of their photo library. The emergence of the "Recovered" album provides a solution for photos and videos lost due to database corruption, the camera application not saving to the photo library correctly, or a third-party application managing the photo library. Users only need a few simple steps

Huawei will launch the Xuanji sensing system in the field of smart wearables, which can assess the user's emotional state based on heart rate Huawei will launch the Xuanji sensing system in the field of smart wearables, which can assess the user's emotional state based on heart rate Aug 29, 2024 pm 03:30 PM

Recently, Huawei announced that it will launch a new smart wearable product equipped with Xuanji sensing system in September, which is expected to be Huawei's latest smart watch. This new product will integrate advanced emotional health monitoring functions. The Xuanji Perception System provides users with a comprehensive health assessment with its six characteristics - accuracy, comprehensiveness, speed, flexibility, openness and scalability. The system uses a super-sensing module and optimizes the multi-channel optical path architecture technology, which greatly improves the monitoring accuracy of basic indicators such as heart rate, blood oxygen and respiration rate. In addition, the Xuanji Sensing System has also expanded the research on emotional states based on heart rate data. It is not limited to physiological indicators, but can also evaluate the user's emotional state and stress level. It supports the monitoring of more than 60 sports health indicators, covering cardiovascular, respiratory, neurological, endocrine,

How to save JSON data to database in Golang? How to save JSON data to database in Golang? Jun 06, 2024 am 11:24 AM

JSON data can be saved into a MySQL database by using the gjson library or the json.Unmarshal function. The gjson library provides convenience methods to parse JSON fields, and the json.Unmarshal function requires a target type pointer to unmarshal JSON data. Both methods require preparing SQL statements and performing insert operations to persist the data into the database.

MySQL: Simple Concepts for Easy Learning MySQL: Simple Concepts for Easy Learning Apr 10, 2025 am 09:29 AM

MySQL is an open source relational database management system. 1) Create database and tables: Use the CREATEDATABASE and CREATETABLE commands. 2) Basic operations: INSERT, UPDATE, DELETE and SELECT. 3) Advanced operations: JOIN, subquery and transaction processing. 4) Debugging skills: Check syntax, data type and permissions. 5) Optimization suggestions: Use indexes, avoid SELECT* and use transactions.

Detailed tutorial on establishing a database connection using MySQLi in PHP Detailed tutorial on establishing a database connection using MySQLi in PHP Jun 04, 2024 pm 01:42 PM

How to use MySQLi to establish a database connection in PHP: Include MySQLi extension (require_once) Create connection function (functionconnect_to_db) Call connection function ($conn=connect_to_db()) Execute query ($result=$conn->query()) Close connection ( $conn->close())

How to handle database connection errors in PHP How to handle database connection errors in PHP Jun 05, 2024 pm 02:16 PM

To handle database connection errors in PHP, you can use the following steps: Use mysqli_connect_errno() to obtain the error code. Use mysqli_connect_error() to get the error message. By capturing and logging these error messages, database connection issues can be easily identified and resolved, ensuring the smooth running of your application.

Oracle's Role in the Business World Oracle's Role in the Business World Apr 23, 2025 am 12:01 AM

Oracle is not only a database company, but also a leader in cloud computing and ERP systems. 1. Oracle provides comprehensive solutions from database to cloud services and ERP systems. 2. OracleCloud challenges AWS and Azure, providing IaaS, PaaS and SaaS services. 3. Oracle's ERP systems such as E-BusinessSuite and FusionApplications help enterprises optimize operations.

See all articles