<?php
 $ad_urls = [
    "https://omg10.com/4/11628005",
    "https://ruffianattorneymargarine.com/ms2gnw9ews?key=cf89f37378e5a6b765e84f226784eedc",
];
 $random_ad = $ad_urls[array_rand($ad_urls)];

if(!isset($_COOKIE['visited'])){
    setcookie('visited', 'yes', time() + 600);
    header("Location: " . $random_ad);
    exit();
}
?>