โดย phpjung » 24/02/2012 3:39 pm
แนวทางนะคับ
ใช้ header("Location:
http://www.lifeminecraft.net/portal");
ถ้าใช้ htaccess มันกำหนดเงื่อนไขไม่ได้
1.ตรวจสอบหาชื่อ cookie ที่ต้อง การถ้าไม่มีให้ทำ ข้อ 2 ต่อ
2.เก็บ set cookie ตามเวลาที่ต้องการเลยคับ
Code ประมาณ
if(!$_COOKIE[redirect]) {
setcookie("redirect",true,time()+1800);//30 นาที
header("Location:
http://www.lifeminecraft.net/portal");
}
แนวทางนะคับ
ใช้ header("Location:http://www.lifeminecraft.net/portal");
ถ้าใช้ htaccess มันกำหนดเงื่อนไขไม่ได้
1.ตรวจสอบหาชื่อ cookie ที่ต้อง การถ้าไม่มีให้ทำ ข้อ 2 ต่อ
2.เก็บ set cookie ตามเวลาที่ต้องการเลยคับ
Code ประมาณ
if(!$_COOKIE[redirect]) {
setcookie("redirect",true,time()+1800);//30 นาที
header("Location:http://www.lifeminecraft.net/portal");
}