Hi Guys
I am currently working on an image upload script. i want to log user upload and record their ips.
I worked on a script(its works) but i am not sure if it will be 100% reliable.
Here is code that i though of
<?php
$ip = $_SERVER['REMOTE_ADDR'];
$filename =$_FILES['image']['name'] // take note of the filename of the file the user is uploading
$date = date("d-m-y / H:i:s");
$insertlogs = $date . " - " . $ip . " - " . $filename . "<br />";
$fopen = fopen("ips.html", "a");
fwrite($fopen, $invoegen);
fclose($fopen);
?>
However i have some doubts on it
1.What will happens if 2 different users upload a file at the same time.I mean will script write ip properly
2.Also it will be an ever expanding html file, will it be better to create html file for specific dates
Show me an example
3.How resource intensive is this script.Will it slow my server much and cause high server loads.If yes what can i do to limit that?
Ultimately i would like to link this to a php form where i will just input the filename and it show out the record