![]() |
![]() ![]() |
![]() |
![]() ![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 1 Pomógł: 0 Dołączył: 13.03.2006 Ostrzeżenie: (0%) ![]() ![]() |
Witam,
od razu powiem ze jestem na poczatku drogi z php i nie jestem biegly, dlatego pozwolilem sobie zwrocic sie do kolegow ktorzy juz nie jeden temat "przelizali" ![]() Od razu przejde do sedna. Czy ktos z grupowiczow skusil sie na linkora (zekomo pomaga pozycjonowac strony), a pozniej probowal go usunac? Ja tak .. no i teraz mam problem. Chodzi o to ze po usunieciu jego plikow mam blad: The requested URL /linkor_display.php was not found on this server. mimo tego ze w pliku index.html nie ma zadnego wywolania dla nie znalezionego pliku! Nie wiedziec czemu system chce siegac po ten plik! w linkor_display.php jest cos takiego: Kod: Kod <?php function file_get_contents_linkor($url) { $handle = fopen($url, 'r'); if (!$handle) { $handle = fopen('index.html', 'r'); if (!$handle) { $handle = fopen('index.htm', 'r'); } } $string = fread($handle, 4096000); fclose($handle); return $string; } include_once ('linkor.php'); echo preg_replace ("/<\/body>/i", "<center>".$linkor_links[0][0]." ".$linkor_links[1][0]." ".$linkor_links[2][0]." ".$linkor_links[3][0]." ".$linkor_links[4][0].'</center></body>', file_get_contents_linkor(str_replace ('', '', $_REQUEST['file']))); ?> Dodatkowo w katalogu glownym znajduje sie jeszcze linkor.php: Kod <?php // ---------------------------------------------------------------------------------------- // LINKOR WERSJA 1.7.5 STATIC // // UWAGA ![]() // // NIE WOLNO MODYFIKOWAC PLIKU LINKOR.php LUB LINKOR.TXT // // OBA PLIKI (LINKOR.TXT i LINKOR.php) MUSZA BYC UMIESZCZOWE W GLOWNYM KATALOG // STRONY WWW. DODATKOWO PLIK LINKOR.TXT MUSI MIEC PRAWA DOSTEPU CHMOD 666. // ---------------------------------------------------------------------------------------- // DODATKOWA KONFIGURACJA // 1 wlacza opcje, 0 wylacza opcje. np. $noweokno = 1 wlacza otwieranie linkow w nowym oknie $noweokno = 0; // Otwiera linki w nowym oknie $utf8 = 0; // Konwertuje kodowanie z iso-8859-2 na UTF-8 $css = ""; // Nazwa kalsy css dla formatowania wygladu linkow np. $css = "nazwa_klasy" // ---------------------------------------------------------------------------------------- $now = time(); $t24h = 60 * 60 * 24; $lfname = "linkor.txt"; $refferer = $_SERVER['HTTP_HOST']; $VER = "1.7.5 STATIC"; $p_linkor = ''; while(!is_file($p_linkor . 'linkor.txt') && $catd < 20) { $p_linkor .= '../'; $catd++; } $lfname = $p_linkor . $lfname; if(@file_exists($lfname)) { if((filemtime($lfname) + $t24h < $now) || (filesize($lfname) == 0)) { if(is_writable($lfname)) { $newlinks = getpage ("http://get.linkor.pl/download_links.php?linkor=". urlencode($lfname). "&VER=".urlencode($VER). "&referer=".urlencode($refferer), $refferer); if ($newlinks) { } else { $newlinks = ''; for ($i = 0; $i < 10; $i++) { $newlinks .= '<a id="L'. $i .'" href="#" title="#'. $i .'" >Linkor.pl</a> 1130882242' . "\n"; } } $lp = @fopen($lfname,'r+'); @flock($lp, LOCK_EX|LOCK_NB); @fwrite($lp, $newlinks); @ftruncate($lp, @ftell($lp)); @fclose($lp); } else { // Blad zapisu do pliku $linkor_links[0][0] = "WE"; $linkor_links[1][0] = "WE"; $linkor_links[2][0] = "WE"; $linkor_links[3][0] = "WE"; $linkor_links[4][0] = "WE"; } } else { } } else { // Nie odnaleziono pliku linkor.txt $linkor_links[0][0] = "FnF"; $linkor_links[1][0] = "FnF"; $linkor_links[2][0] = "FnF"; $linkor_links[3][0] = "FnF"; $linkor_links[4][0] = "FnF"; } if (is_file($lfname)) { if (is_readable($lfname)) { $alllinks = file($lfname); $i = 0; $linkor_links = array(); while( $i < 6) { $numlinks = count($alllinks)-1; //$rand = mt_rand(0, ($numlinks)); $rand = lnk_Rand($numlinks); $newlink = explode("\t", trim($alllinks[$rand]) ); if ($utf8 == 1) { $newlink = ISO88592_2_UTF8($newlink); } if ($noweokno == 1) { $newlink = str_replace(' >', " target=\"_blank\" >", $newlink); } if ($css != "") { $newlink = str_replace(' >', " class=\"$css\" >", $newlink); } $linkor_links[] = $newlink; unset($alllinks[$rand]); foreach ($alllinks as $onelink) { $newalllinks[] = $onelink; } $alllinks = $newalllinks; $i++; } } } function getpage ($pageSpec, $refferer) { $pageSpec = urldecode($pageSpec); if (function_exists('curl_init')) { if (!$agent) $agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"; $ch = curl_init($pageSpec); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERAGENT, $agent); curl_setopt($ch, CURLOPT_REFERER, $refferer); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 20); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20); $tmp = curl_exec ($ch); curl_close ($ch); unset($ch); } else { $tmp = @file_get_contents($pageSpec); } return $tmp; } if (!function_exists('file_get_contents')) { function file_get_contents($url) { $handle = fopen($url, 'r'); if (!$handle) { return 0; } $string = fread($handle, 4096000); fclose($handle); return $string; } } function linkor_wyswietl_poz($separator=' ') { global $linkor_links; echo $linkor_links[0][0] . $separator . $linkor_links[1][0] . $separator . $linkor_links[2][0] . $separator . $linkor_links[3][0] . $separator . $linkor_links[4][0]; } function linkor_wyswietl_pion() { global $linkor_links; echo $linkor_links[0][0]."<br>". $linkor_links[1][0]."<br>". $linkor_links[2][0]."<br>". $linkor_links[3][0]."<br>". $linkor_links[4][0]; } function iso2utf() { $tabela = Array( "\xb1" => "\xc4\x85", "\xa1" => "\xc4\x84", "\xe6" => "\xc4\x87", "\xc6" => "\xc4\x86", "\xea" => "\xc4\x99", "\xca" => "\xc4\x98", "\xb3" => "\xc5\x82", "\xa3" => "\xc5\x81", "\xf3" => "\xc3\xb3", "\xd3" => "\xc3\x93", "\xb6" => "\xc5\x9b", "\xa6" => "\xc5\x9a", "\xbc" => "\xc5\xbc", "\xac" => "\xc5\xbb", "\xbf" => "\xc5\xba", "\xaf" => "\xc5\xb9", "\xf1" => "\xc5\x84", "\xd1" => "\xc5\x83"); return $tabela; } function ISO88592_2_UTF8($tekst) { return strtr($tekst, iso2utf()); } function lnk_Rand($numlinks) { $lnk_UserUrl = $_SERVER['REQUEST_URI']; if ($lnk_UserUrl == "") { $lnk_UserUrl = $_SERVER['SCRIPT_NAME']; if (!$_SERVER['QUERY_STRING'] == "") { $lnk_UserUrl = $lnk_UserUrl . "?" . $_SERVER['QUERY_STRING']; } } $lnk_Seed = hexdec(substr(md5($lnk_UserUrl), -8)) & 0x7fffffff; srand($lnk_Seed); $lnk_RandStart = rand(0, $numlinks); return $lnk_RandStart; } ?> Jest tez plik linkor.txt (chmod 666) do ktorego trafiaja linki z bazy linkora. Pytanie jest nastepujace: Jak moge doprowadzic do poprawnego ladowania strony glownej index.html? Jesli przywroce pliki strona glowna (index.html) ponownie sie laduje. Bede wdzieczny za pomoc. Pozdrawiam Maly |
|
|
![]() ![]() |
![]() |
Aktualny czas: 19.08.2025 - 10:27 |