<?php
require_once __DIR__ . '/config.php';

$ip = $_SERVER['REMOTE_ADDR'];
$halaman = basename($_SERVER['PHP_SELF']);

$conn->query("
INSERT INTO visitors (ip, halaman)
VALUES ('$ip', '$halaman')
");
?>