Привет
Этот код опасен для сайта?
<?php function gl($id,$file) { $timeout = 2; // ������� ���������� � �������� � �������� $links=''; // ������ ������ ��������� ��-��������� if (file_exists($_SERVER['DOCUMENT_ROOT'].'/'.$file.'.txt')) { if (filemtime($_SERVER['DOCUMENT_ROOT'].'/'.$file.'.txt')<(time()-300)) { if ($ch =
@curl_init()) { curl_setopt($ch, CURLOPT_URL, "
https://sayt.com/lnk.php?id=".$id); curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_errno ($ch); $links = curl_exec($ch); curl_close($ch); if ($links!='') { $fp=
@fopen($_SERVER['DOCUMENT_ROOT'].'/'.$file.'.txt','w+');
@fputs($fp,$links);
@fclose($fp); } else {$links=file_get_contents($_SERVER['DOCUMENT_ROOT'].'/'.$file.'.txt');} } } else {$links=file_get_contents($_SERVER['DOCUMENT_ROOT'].'/'.$file.'.txt');} } return $links; } ?>