|
<?php $_GET['category']=urldecode($_GET['category']);?>
<html>
<head>
<title><?=$_SERVER['HTTP_HOST']?> <?=$_GET['category']?> Links Directory</title>
<?php
// Change the following variable to set how many links to display on
// each page of your directory:
$linksPerPage = '20';
// If the links on your directory don't work properly, put in the complete url
// to the this file in the variable below. Example:
// $file='http://www.your-site.com/this_file.php';
$file=$_SERVER['PHP_SELF'];
// DO NOT MODIFY ANYTHING BELOW THIS LINE:
$userKey='28e-c09-a01-60a';
$mainFile='http://www.instantlinking.com/links.php';
$siteId='0';
$file=urlencode($file);
$mainFile=$mainFile.'?file='.$file;
$mainFile.='&userKey='.$userKey;
$mainFile.='&linksPerPage='.$linksPerPage;
if ($siteId > 0)
$mainFile.='&siteId='.$siteId;
if (is_numeric($_GET['c']))
$mainFile.='&c='.$_GET['c'];
if (is_numeric($_GET['page']))
$mainFile.='&page='.$_GET['page'];
if ($_GET['category'] !='')
$mainFile.='&category='.urlencode($_GET['category']);
if(intval(get_cfg_var('allow_url_fopen')) && function_exists('readfile'))
{
$data=@readfile($mainFile);
if ($data)
die;
}
if(intval(get_cfg_var('allow_url_fopen')) && function_exists('file_get_contents'))
{
$data=@file_get_contents($mainFile);
if ($data)
{
echo $data;
die;
}
}
if(intval(get_cfg_var('allow_url_fopen')) && function_exists('file'))
{
$data=@file($mainFile);
if ($data)
{
$content=implode('',$data);
echo $content;
die;
}
}
if(function_exists('curl_init'))
{
$link = curl_init ($mainFile);
curl_setopt ($link, CURLOPT_HEADER, 0);
curl_exec ($link);
if(! curl_error($link))
{
curl_close ($link);
die;
}
}
echo "Sorry, your directory cannot be displayed. Please ask your web host to
enable some of the functions for the handling of remote files and try again.";
?>
<hr>
Copyright 2006, InstantLinking.com.
</head>
</html>
|