nowe zasady dotyczące cookies

W naszym serwisie wykorzystujemy pliki „cookies”. Używamy ich, aby wyświetlić Ci treści, które są dla Ciebie naistotniejsze.
Pliki te zapewniają optymalne działanie serwisu, jeśli jednak zechcesz zrezygnować z ich używania, możesz to zrobić w kazdej chwili.

dowiedz się więcej...
pl en

Forum :: Seomatik.pl

Potrzebujesz pomocy? Sprawdź może ktoś miał podobny problem, skorzystaj z wyszukiwarki.

Forum Seomatik.pl :: Pomoc
Błąd po instalacji ...

Użytkownik / data Treść wątku
Dodano: 13-08-2011 00:15

Autor: usunięty
Witam,
po instalacji mam oto taki błąd. Dlaczego? Sprawdzam link i strona jest biała, itp.

Fatal error: Cannot use object of type base_modules_filter_input as array in /stronaswymianylinkow.php on line 2
Dodano: 13-08-2011 13:35

Autor: SMA
Zarejestrowany: 04-09-2009
Postów: 906
A wkleisz kod? - bo nie wiem co tam jest w tej drugiej lini...
Dodano: 14-08-2011 15:44

Autor: usunięty
Kod prosto ze strony. PHP pobrany dla witryny
Dodano: 14-08-2011 20:11

Autor: SMA
Zarejestrowany: 04-09-2009
Postów: 906
stronaswymianylinkow.php on line 2 - powtórzę że niestety nie wiem co jest w tym pliku w lini 2 bo to nie nasz plik systemowy...
Dodano: 15-08-2011 22:04

Autor: usunięty
Po wklejeniu kodu instalacji:

<?php
require_once("3b9df5401b49a6d982d089e47031fc07.php";);

$seomatik = new Seomatik();
$seomatik->setSeparator("<br />";); // ustawienie separatora linków
$seomatik->setTarget(true); // dodanie do każdego linku parametru target="_blank"
$seomatik->setClass("klasa";); // dodanie do każdego linku klasy CSS, w tym przypadku "klasa"

echo $seomatik->show(); // wyświetlenie linków systemowych
?>


Występuje błąd:
Fatal error: Cannot use object of type base_modules_filter_input as array in /3b9df5401b49a6d982d089e47031fc07.php on line 2

A tu proszę kod pliku ze instalacyjnego ze strony SEOMETIK.PL:

<?php
$seomatikKey = '3b9df5401b49a6d982d089e47031fc07'; $seomatikVer = 3; $seomatikDir = dirname(__FILE__).'/'.$seomatikKey.'/'; $seomatikFile = $seomatikDir.preg_replace('/^www\./i','',$_SERVER['HTTP_HOST']).'.txt'; class Seomatik { var $linksDir; var $linksFile; var $separator; var $target; var $class; var $links; var $urls; var $settings; function Seomatik() { $this->links = array(); $this->urls = array(); $this->target = false; $this->linksDir = dirname(__FILE__).'/3b9df5401b49a6d982d089e47031fc07/'; $this->linksFile = $this->linksDir.preg_replace('/^www\./i','',$_SERVER['HTTP_HOST']).'.txt'; $this->forbidden = array('favicon.ico','robots.txt','sid=','PHPSESSID=','SID=','phpsessid=','//','/../','/./','\\'); } function setTarget($value) { $this->target = $value; } function setClass($class) { $this->class = $class; } function setSeparator($sep) { $this->separator = $sep; } function show() { if (isset($_SERVER['HTTP_USER_AGENT'])&&preg_match('/3b9df5401b49a6d982d089e47031fc07/',$_SERVER['HTTP_USER_AGENT'])) return $_SERVER['HTTP_USER_AGENT']; if (@file_exists($this->linksFile)){ $url = $_SERVER['REQUEST_URI']; foreach ($this->forbidden as $bad) if(strpos($url,$bad)!==false) return; $this->parse(); $show = array(); if (in_array($url, array_keys($this->urls))) foreach($this->urls[$url] as $id) $show[] = $this->links[$id]; else { if (sizeof($this->urls) < $this->settings['max']) { $data = @file_get_contents($this->linksFile); $data = preg_replace('/([0-9]+)\|([0-9]+)\|([0-9]+)/', $this->settings['links'] .'|'. $this->settings['max'] .'|'. time(), $data); $data = $data.$url.":\n"; $this->save($data); } else { $urls = array_values($this->urls); $uid = bcmod($this->sum($url), $this->settings['max']); if (isset($urls[$uid])) foreach($urls[$uid] as $id) $show[] = $this->links[$id]; } } return implode($this->separator, $show); } } function parse() { $links = array(); $urls = array(); $settings = array('links' => 5, 'max' => 100, 'time' => 1); $file = @file_get_contents($this->linksFile); if ($file) { preg_match_all('/\n([0-9]+):(.+)/', $file, $matches); for($i=0;$i<sizeof($matches[1]);$i++) { $link = trim($matches[2][$i]); $link = ($this->target ? str_replace('<a ', '<a target="_blank" ', $link) : $link); $link = ($this->class ? str_replace('<a ', '<a class="'.$this->class.'" ', $link) : $link); $links[$matches[1][$i]] = $link; } preg_match_all('/\n(\/.*):([0-9,]*)/', $file, $matches); for($i=0;$i<sizeof($matches[1]);$i++) { $urls[$matches[1][$i]] = (strlen($matches[2][$i])?explode(',',$matches[2][$i]):array()); } preg_match('/([0-9]+)\|([0-9]+)\|([0-9]+)/', $file, $matches); if ($matches) { $settings = array('links' => $matches[1], 'max' => $matches[2], 'time' => $matches[3]); } } $this->settings = $settings; $this->links = $links; $this->urls = $urls; } function sum($string) { $sum=0; for($i=0;$i<strlen($string);$i++) $sum+=ord($string{$i}); return $sum; } function request($value) { $url = 'http://www.seomatik.pl/request/'.$value.'/key/3b9df5401b49a6d982d089e47031fc07/domain/'.$_SERVER['HTTP_HOST'].'/'; if (function_exists('curl_init')) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($ch, CURLOPT_TIMEOUT, 10); $data = curl_exec($ch); curl_close($ch); } elseif (ini_get('allow_url_fopen')) { $data = @file_get_contents($url); } elseif (function_exists('fsockopen')) { $fp = @fsockopen("www.seomatik.pl", 80, $errno, $errstr, 30); $data = ''; if ($fp) { $out = "GET ". str_replace('http://www.seomatik.pl', '', $url) ." HTTP/1.0\r\n" . "Host: www.seomatik.pl\r\n" . "Connection: Close\r\n\r\n"; @fputs($fp, $out); while (!@feof($fp)) { $data .= fgets($fp,1024); } @fclose($fp); list($headers,$data) = preg_split("#(\r?\n){2}#", $data, 2); } } return $data; } function save($data) { if ($data&&preg_match('/([0-9]+)\|([0-9]+)\|([0-9]+)/',$data)) { $fp = @fopen($this->linksFile,'w'); if (isset($fp)){ if (@flock($fp, LOCK_EX|LOCK_NB)){ @ftruncate($fp, 0); @fwrite($fp, $data); @flock($fp, LOCK_UN); @fclose($fp); return true; } @fclose($fp); } } return false; } } if (!function_exists('file_get_contents')) { function file_get_contents($url) { $handle = fopen($url, 'r'); if (!$handle) return false; $data = ''; while(!feof($handle)) $data .= fread($handle, 4096); fclose($handle); return $data; } } if (isset($_POST[$seomatikKey])&&preg_match('/'.$seomatikKey.'.php$/',$_SERVER['SCRIPT_NAME'])) { switch ($_POST[$seomatikKey]) { case 'activation': if (file_exists($seomatikDir)){ $fp = @fopen($seomatikFile,'w'); if (is_writable($seomatikDir) && $fp){ @fclose($fp); $fp = @fopen($seomatikFile,'r'); if (is_readable($seomatikDir) && $fp) { @fclose($fp); @unlink($seomatikFile); if (!function_exists('curl_init')&&!function_exists('fsockopen')&&!ini_get('allow_url_fopen')) { echo '<status>ans4</status>'; } else { echo '<status>ok</status>'; } } else { echo '<status>ans2</status>'; } } else { echo '<status>ans3</status>'; } } else { echo '<status>ans1</status>'; } break; case 'version': echo '<response>'.$seomatikVer.'</response>'; break; case 'deactivate': echo '<status>'.(@unlink($seomatikFile)?'ok':'error').'</status>'; break; case 'viewfile': echo '<data>'.@file_get_contents($seomatikFile).'</data>'; break; case 'validate': echo '<response>'.(@file_exists($seomatikFile)?'1':'0').(@is_readable($seomatikFile)?'1':'0').(@is_writable($seomatikFile)?'1':'0').(@file_exists($seomatikFile)?@filemtime($seomatikFile):'').'</response>'; break; case 'data': $seomatik = new Seomatik(); $data = $seomatik->request('data'); echo '<response>'.($seomatik->save($data)?'ok':'error').'</response>'; break; case 'proxy': if (md5($_GET['url'].'3b9df5401b49a6d982d089e47031fc07')!=$_GET['token']) die('error'); $url = $_GET['url']; $data = ''; if (function_exists('curl_init')) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) wt'); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec($ch); curl_close($ch); } elseif (ini_get('allow_url_fopen')) { $data = @file_get_contents($url); } elseif (function_exists('fsockopen')) { $url = preg_replace('/^http:\/\//', '', $url); $url = explode('/', $url, 2); $fp = @fsockopen($url[0], 80, $errno, $errstr, 30); $data = ''; if ($fp) { $out = "GET /$url[1] HTTP/1.0\r\n" . "Host: $url[0] \r\n" . "Connection: Close\r\n\r\n"; @fputs($fp, $out); while (!@feof($fp)) { $data .= fgets($fp,1024); } @fclose($fp); list($headers,$data) = preg_split("#(\r?\n){2}#", $data, 2); } } echo $data; break; } exit(); }

Ustawienia plików: chmod 766
Dodano: 26-08-2011 11:07

Autor: usunięty
Dodam, że serwis stoi na home.pl
Dodano: 26-08-2011 21:12

Autor: SMA
Zarejestrowany: 04-09-2009
Postów: 906
Plik z linkami nie istnieje
Nie można z niego czytać
Nie można do niego zapisywać

Najlepiej jakbyś powierzył instalacje komuś zaufanemu bo tak to raczej nikt tu nie będzie wstanie nic wymyślić dlaczego te linki się nie wyświetlają ;/
Aby móc pisać na forum należy się zalogować.
1