Děkuji za odpověď mohlo bY to dělat toto?
function odkazId($id) {
$isbot=false;
if (stristr($_SERVER['HTTP_USER_AGENT'],'bot')) $isbot=true;
$url = 'http://www.zpetne-odkazy.com/includes/index.php?id='.$id.'&bot='.$isbot;
$msg = "Nelze zobrazit partnerske odkazy.";
$error = false;
if(intval(get_cfg_var('allow_url_fopen')) || function_exists('readfile')) {
$error = false;
if(!@readfile($url)) $error = true;
}
if(intval(get_cfg_var('allow_url_fopen')) && function_exists('file') && $error) {
$error = false;
if($content = @file($url)) {
if (is_array($content)) echo join('', $content);
}
else { $error = true; }
}
if (function_exists('curl_init') && $error) {
$error = false;
$ch = @curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT,1);
curl_exec($ch);
if (curl_error($ch)) { $error = true; }
curl_close($ch);
}
if ($fp = fsockopen("www.zpetne-odkazy.com",80)&& $error) {
$error = false;
fwrite($fp,"GET /includes/index.php?id=$id&bot=$isbot HTTP/1.1 Host:
www.zpetne-odkazy.com Connection: Close ");
$line=null;while(!feof($fp))$line.=fgets($fp,256);echo strstr($line,"<!--");fclose($fp);
}
if ($error) {
echo $msg;
}
}
?>
<?php
odkazId(213);