I am using the below code to allow websites to use my content.
[code=php]<?php
$game = $_GET[‘game’];
$page = $_GET[‘page’];
$letter = $_GET[‘letter’];
$console = $_GET[‘console’];
if(!$console && !$letter && !$game && !$page) {
include(“http://www.gameslayer.co.uk/cheatserve/serve/default.php?type=content”);
} else {
include(“http://www.gameslayer.co.uk/cheatserve/serve/” . $console . $letter . $game . $page . “.php?type=content”);
}
?>
I only want to allow pre-approved sites to include my files, using the above code. As it is pre-approval i will need an allow list, and all others to be disallowed.
I’m aware i can use echo $_SERVER[‘HTTP_HOST’]; to find the domain name, which would have to be added to the first code, and possible stored as a variable and then found by the page it includes.
Is this possible?