<?php
session_start();
// Get the user's IP address
$user_ip = $_SERVER['REMOTE_ADDR'];
// Get the URL of the current page
$current_url = $_SERVER['REQUEST_URI'];
// Check if the user has a browsing history
if (!isset($_SESSION['browsing_history'])) {
// If not, create a new browsing history array and add the current page to it
$_SESSION['browsing_history'] = array($current_url);
} else {
// If yes, add the current page to the browsing history array
array_push($_SESSION['browsing_history'], $current_url);
}
// Check if the user is suspicious based on their browsing history
$is_suspicious = false;
// Count the number of pages the user has visited
$num_pages_visited = count($_SESSION['browsing_history']);
if ($num_pages_visited > 10) {
// If the user has visited more than 10 pages, mark them as suspicious
$is_suspicious = true;
} else {
// Check if the user has accessed any vulnerable pages
foreach ($_SESSION['browsing_history'] as $page) {
if (strpos($page, 'admin.php') !== false) {
// If the user has accessed an admin page, mark them as suspicious
$is_suspicious = true;
break;
}
}
}
if ($is_suspicious) {
// If the user is suspicious, block them from accessing the website
header('HTTP/1.1 403 Forbidden');
echo 'Access to this website is blocked.';
exit();
}
// Display the rest of the page content
echo 'Welcome to my website!';
?>
เวอไนน์เว็บไซต์⚡️
สร้างเว็บไซต์ ดูแลเว็บไซต์
Categories
- ai (1)
- cat (1)
- computer internet (285)
- food (2)
- med (23)
- Music Movie (31)
- tool (43)
- ฮวงจุ้ย (9)
- Travel (69)
- Uncategorized (1,505)
- web (628)
- Line Liff เราพัฒนาให้มันส่งข้อความทีเดียวไปให้สมาชิกทั้งหมดทุกห้องได้ไหม กรณีทำnote
- Unable to create directory uploads/2026/09. Is its parent directory writable by the server? อัพโหลดรูปไม่ได้
- 📊 สรุปสถิติและข้อมูลเชิงลึก (Quantitative & Qualitative Insights)
- WordPress 7.1.1
- phpwind ยังมีไหม?
- การตั้งค่า LINE LIFF (LINE Front-end Framework)
- การที่เพิ่งอัปเดตเป็น WordPress 7.1.1 แล้วพบปัญหา เข้าหน้าเขียน/แก้ไข Post ไม่ได้ (เช่น หน้าจอขาว, ขึ้นหมุนค้าง หรือแสดง Error)
- ตามหลักฮวงจุ้ย ต้นกล้วยควรปลูกไว้ “นอกบ้าน” เท่านั้น และไม่ควรปลูกไว้ภายในตัวบ้านโดยเด็ดขาด
- วิธีปรับจำนวนรายการใน wordpress Theme listmode
- exo-menu ถูกบังโดย tab menu ย่อยใน หน้าสินค้า
- ทดสอบ
- path DIR
- หนี้ทางประวัติศาสตร์v(Technical Debt) และ ธุรกิจ ของ wordpress POST vs PAGE
- testtt
- มื่อลูกค้ากดลิ้ง ผ่าน line app
- ผมอยากได้ระบบง่ายและเร็วและเสถียร ใช้ได้ทุกอุปกรณ์
- บังคับให้ popup เลย
- Med Project
- Paht ของเว็บไซต์
- ให้ลูกค้าจดโดเมนเอง และ เราช่วยดูแล