Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.

Thread: 

How to set a cookie with PHP code?

Ads
banner
banner
banner
miami boy Offline referral

Posts: 82
Joined: May 2014
Reputation: 0

#1
Member
Can anybody teach me how to use PHP code to set a cookie whenever you open or visit a page?
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#2
Support Team
It's pretty easy to set a cookie using PHP here is an example!
PHP Code:
<?php
$cookie_name 
"Name of your cookie";
$cookie_value "Content of your cookie";
setcookie($cookie_name$cookie_valuetime() + (86400 30), "/"); // This cookie will expire in 24 hours or 1 day
?>
Rapidsoft technologies Offline referral

Posts: 209
Joined: Sep 2015
Reputation: 1

#3
Member
Nice update! I was looking for the same code.





User(s) browsing this thread: 1 Guest(s)