View source
<?php
require_once 'adserve.inc';
if (isset($_GET['o'])) {
$output = preg_replace('/[^a-zA-Z0-9_-]/', '', $_GET['o']);
if ($output == 'image') {
require_once 'imageserve.inc';
adserve_counter_image();
exit(0);
}
else {
if ($output) {
$files = array(
"{$output}.inc",
"{$output}/{$output}.inc",
"../{$output}/{$output}.inc",
);
foreach ($files as $file) {
$function = $output . '_serve';
if (file_exists($file)) {
require_once "{$file}";
if (function_exists($function)) {
$function();
exit(0);
}
}
}
}
}
}
adserve_ad();