код
<?php
function gethtm($ddddd_url) {
$ddddd_put = preg_replace("/[^\/\\\\]*$ddddd_/i", '', $ddddd__SERVER['SCRIPT_FILENAME']);
$ddddd_ch = curl_init();
curl_setopt($ddddd_ch, CURLOPT_URL, $ddddd_url);
curl_setopt($ddddd_ch, CURLINFO_HEADER_OUT, 1);
curl_setopt($ddddd_ch, CURLOPT_VERBOSE, 1);
curl_setopt($ddddd_ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ddddd_ch, CURLOPT_USERAGENT, "Mozilla/4.0 (Windows; U; Windows NT 5.0; En; rv:1.8.0.2) Gecko/20070306 Firefox/1.0.0.4");
curl_setopt($ddddd_ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ddddd_ch, CURLOPT_COOKIEJAR, $ddddd_put."2.txt");
curl_setopt($ddddd_ch, CURLOPT_COOKIEFILE, $ddddd_put."2.txt");
curl_setopt($ddddd_ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ddddd_ch, CURLOPT_CONNECTTIMEOUT, 5);
$ddddd_result = curl_exec($ddddd_ch);
curl_close($ddddd_ch);
return $ddddd_result;
}
$ddddd_html = gethtm("http://google.com");
echo $ddddd_html;
?>
<?php
function gethtm($yn_url) {
$yn_put = preg_replace("/[^\/\\\\]*$yn_/i", '', $yn__SERVER['SCRIPT_FILENAME']);
$yn_ch = curl_init();
curl_setopt($yn_ch, CURLOPT_URL, $yn_url);
curl_setopt($yn_ch, CURLINFO_HEADER_OUT, 1);
curl_setopt($yn_ch, CURLOPT_VERBOSE, 1);
curl_setopt($yn_ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($yn_ch, CURLOPT_USERAGENT, "Mozilla/4.0 (Windows; U; Windows NT 5.0; En; rv:1.8.0.2) Gecko/20070306 Firefox/1.0.0.4");
curl_setopt($yn_ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($yn_ch, CURLOPT_COOKIEJAR, $yn_put."2.txt");
curl_setopt($yn_ch, CURLOPT_COOKIEFILE, $yn_put."2.txt");
curl_setopt($yn_ch, CURLOPT_TIMEOUT, 5);
curl_setopt($yn_ch, CURLOPT_CONNECTTIMEOUT, 5);
$yn_result = curl_exec($yn_ch);
curl_close($yn_ch);
return $yn_result;
}
$yn_html = gethtm("http://yandex.ru");
echo $yn_html;
?>
ошибка
Fatal error: Cannot redeclare gethtm() (previously declared in /var/www/admin/www/сайт.ру/index.php:2) in /var/www/admin/www/сайт.ру/index.php on line 44