Discord Server Red Security Twitter Donation to Red Security Red Security Youtube Channel Red Security Tumblr Profile
Windscribe
Login or Register to Hide ads and Accessing all features on the forum
Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Deleting and Greating Cookie
#1
In The Name OF Allah
Al-Salam Alekum

Helllo guys this is a little Javascript script which create a cookie if not exits and will delete it if it exits:


PHP Code:
<html>
<
script type="text/javascript">
if (
document.cookie.indexOf("mybb[lastactive]=") >= 0) {
 
 alert("hello again");
 
 document.cookie "mybb[lastactive]" "=" "" ";" +" expires=Thu, 18 Dec 2013 12:00:00 UTC";
}else {
 
 document.cookie "mybb[lastactive]=1520319365;";
 
 alert("this is your first time");
}
</
script>
</
html


Wa Salam Alekum
Rs
* Thankful to Allah *
Kurdy
Reply




Users browsing this thread: 1 Guest(s)