hello experts and owner of site i want code that a person ip can visit only one day one time of a page for ex: if ip same then the file can not display and if new ip or ip next day come then the file shows
please help me again
Started on the old forum in February 2012 · view the original in the archive · old links redirect here
without using database:
if($_COOKIE["filedata"]<time())
{
echo "download link";
}
if(!$_COOKIE["filedata"]) //save cookie being updated to new
{
$day = time()+86400;
setcookie("filedata", $day, $day);
}
something else wrote: without using database:
if($_COOKIE["filedata"]<time()) { echo "download link"; } if(!$_COOKIE["filedata"]) //save cookie being updated to new { $day = time()+86400; setcookie("filedata", $day, $day); }
very nice for a script where security ain't dat imp, thanks,it came to my mind lately(after I saw the post 😀)
Final edit 😀
I need some facebook likes, can you please help me 🤝 http://facebook.com/softwarefreakin I noticed social media is really powerful 🧙 Well DONE is better than well SAID
My small edit of somthing's code
<?php
if(isset($_COOKIE["filedata"]) && $_COOKIE["filedata"]>time())
{
echo "Come back tomorrow for another cookie :P";
}
else
{
$day = time()+86400;
setcookie("filedata", $day, $day);
echo "download link";
}
?>
I need some facebook likes, can you please help me 🤝 http://facebook.com/softwarefreakin I noticed social media is really powerful 🧙 Well DONE is better than well SAID