<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>TEA &amp; SEO Блог</title>
	
	<link>http://teaseo.ru</link>
	<description>Описание блога - вот так!</description>
	<lastBuildDate>Fri, 18 May 2012 13:30:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/TeaSeo" /><feedburner:info uri="teaseo" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>php  пример загрузки файлов</title>
		<link>http://feedproxy.google.com/~r/TeaSeo/~3/ZZcbUKSPHlg/723</link>
		<comments>http://teaseo.ru/php/php-primer-zagruzki-fajlov/723#comments</comments>
		<pubDate>Fri, 18 May 2012 13:29:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://teaseo.ru/?p=723</guid>
		<description><![CDATA[1) как вариант &#8212; классом http://phpfileuploader.com/demo/index.php 2) по простому (ниже) &#60;?php &#160; header&#40;'Content-Type: text/html; charset=utf-8'&#41;; &#160; $uploaddir = '/home/download/public_html/uploads/'; &#160; $uploadfile = $uploaddir . basename&#40;$_FILES&#91;'userfile'&#93;&#91;'name'&#93;&#41;; &#160; echo '&#60;pre&#62;'; if &#40;move_uploaded_file&#40;$_FILES&#91;'userfile'&#93;&#91;'tmp_name'&#93;, $uploadfile&#41;&#41; &#123; echo &#34;Файл корректен и был успешно загружен.\n&#34;; &#125; else &#123; echo &#34;Возможная атака с помощью файловой загрузки!\n&#34;; &#160; $upload_errors = array&#40; UPLOAD_ERR_OK =&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>1) как вариант &#8212; классом</p>
<p>http://phpfileuploader.com/demo/index.php</p>
<p>2) по простому (ниже)</p>
<p><span id="more-723"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
&nbsp;
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-Type: text/html; charset=utf-8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #000088;">$uploaddir</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'/home/download/public_html/uploads/'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$uploadfile</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$uploaddir</span> <span style="color: #339933;">.</span> <span style="color: #990000;">basename</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_FILES</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'userfile'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;pre&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">move_uploaded_file</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_FILES</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'userfile'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'tmp_name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$uploadfile</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Файл корректен и был успешно загружен.<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Возможная атака с помощью файловой загрузки!<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$upload_errors</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    UPLOAD_ERR_OK        <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;No errors.&quot;</span><span style="color: #339933;">,</span>
    UPLOAD_ERR_INI_SIZE    <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;Larger than upload_max_filesize.&quot;</span><span style="color: #339933;">,</span>
    UPLOAD_ERR_FORM_SIZE    <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;Larger than form MAX_FILE_SIZE.&quot;</span><span style="color: #339933;">,</span>
    UPLOAD_ERR_PARTIAL    <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;Partial upload.&quot;</span><span style="color: #339933;">,</span>
    UPLOAD_ERR_NO_FILE        <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;No file.&quot;</span><span style="color: #339933;">,</span>
    UPLOAD_ERR_NO_TMP_DIR    <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;No temporary directory.&quot;</span><span style="color: #339933;">,</span>
    UPLOAD_ERR_CANT_WRITE    <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;Can't write to disk.&quot;</span><span style="color: #339933;">,</span>
    UPLOAD_ERR_EXTENSION     <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;File upload stopped by extension.&quot;</span><span style="color: #339933;">,</span>
    UPLOAD_ERR_EMPTY        <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;File is empty.&quot;</span> <span style="color: #666666; font-style: italic;">// add this to avoid an offset</span>
  <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #666666; font-style: italic;">// error: report what PHP says went wrong</span>
   <span style="color: #000088;">$err</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$upload_errors</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$_FILES</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'userfile'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'error'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #b1b100;">echo</span>   <span style="color: #000088;">$err</span><span style="color: #339933;">;</span>  
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Некоторая отладочная информация:'</span><span style="color: #339933;">;</span>
<span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_FILES</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;</span></pre></div></div>

<p>&#171;;</p>
<p>?><br />
<!-- Тип кодирования данных, enctype, ДОЛЖЕН БЫТЬ указан ИМЕННО так --></p>
<form enctype="multipart/form-data" action="" method="POST">
    <!-- Поле MAX_FILE_SIZE должно быть указано до поля загрузки файла --></p>
<input type="hidden" name="MAX_FILE_SIZE" value="30000000" />
    <!-- Название элемента input определяет имя в массиве $_FILES --><br />
    Отправить этот файл:<br />
<input name="userfile" type="file" />
<input type="submit" value="Send File" />
</form>
</pre>
<img src="http://feeds.feedburner.com/~r/TeaSeo/~4/ZZcbUKSPHlg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://teaseo.ru/php/php-primer-zagruzki-fajlov/723/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://teaseo.ru/php/php-primer-zagruzki-fajlov/723</feedburner:origLink></item>
		<item>
		<title>анти ddos — http  flood (nginx)</title>
		<link>http://feedproxy.google.com/~r/TeaSeo/~3/pV8KCCEX0Dw/721</link>
		<comments>http://teaseo.ru/debian/anti-ddos-http-flood-nginx/721#comments</comments>
		<pubDate>Tue, 01 May 2012 16:24:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://teaseo.ru/?p=721</guid>
		<description><![CDATA[http://habrahabr.ru/post/84172/ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 #!/bin/bash # chmod 755 anti_ddos.sh # ./anti_ddos.sh &#160; &#160; #find cat /var/log/nginx/error.log &#124; grep &#34;limiting connections by zone&#34; &#124; grep &#34;request: \&#34;GET / HTTP/1.1&#34;&#124; awk '{print $12}'&#124; awk [...]]]></description>
			<content:encoded><![CDATA[<p>http://habrahabr.ru/post/84172/</p>
<p><span id="more-721"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="sh" style="font-family:monospace;">#!/bin/bash 
# chmod 755 anti_ddos.sh
# ./anti_ddos.sh
&nbsp;
&nbsp;
#find
cat /var/log/nginx/error.log | grep &quot;limiting connections by zone&quot; | grep &quot;request: \&quot;GET / HTTP/1.1&quot;| awk '{print $12}'| awk -F&quot;,&quot; '{print $1}'| sort | uniq -c | sort -nr &gt; /tmp/botnet.blacklist
&nbsp;
#/tmp/botnet.blacklist
# очищаем скрипт бана
cat /dev/null &gt; /tmp/iptables_ban.sh
&nbsp;
# создаем DROP правила для 50 самых агрессивных ботов
awk '{print &quot;iptables -A INPUT -p tcp --dport 80 -s &quot; $2 &quot; -j DROP&quot; }' /tmp/botnet.blacklist | head -n 50 &gt;&gt; /tmp/iptables_ban.sh
&nbsp;
# загружаем blacklist
bash /tmp/iptables_ban.sh
&nbsp;
# делаем ротацию лога
cat /dev/null &gt; /var/log/nginx/error.log
[ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
&nbsp;
&nbsp;
*/5 * * * * /root/script/ban.sh
&nbsp;
В результате iptables будет пополнятся новыми ботами.</pre></td></tr></table></div>

<img src="http://feeds.feedburner.com/~r/TeaSeo/~4/pV8KCCEX0Dw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://teaseo.ru/debian/anti-ddos-http-flood-nginx/721/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://teaseo.ru/debian/anti-ddos-http-flood-nginx/721</feedburner:origLink></item>
		<item>
		<title>Как отключить отправку писем с результатами выполнения cron ? (crontab mailto disable)</title>
		<link>http://feedproxy.google.com/~r/TeaSeo/~3/8lvisPpk734/717</link>
		<comments>http://teaseo.ru/debian/kak-otklyuchit-otpravku-pisem-s-rezultatami-vypolneniya-cron-crontab-mailto-disable/717#comments</comments>
		<pubDate>Fri, 27 Apr 2012 14:40:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Debian]]></category>

		<guid isPermaLink="false">http://teaseo.ru/?p=717</guid>
		<description><![CDATA[для этого в конце комманды скрипты дописываем > /dev/null 2>&#038;1 /dev/null 2>&#038;1 или 1) update-alternatives --config editor - выбрать в консоль редактор по умолчанию 2) crontab -e 3) сменить или дописать вверх - MAILTO=""]]></description>
			<content:encoded><![CDATA[<p>для этого в конце комманды скрипты дописываем > /dev/null 2>&#038;1<<br />
пример<br />
<code>php /root/pkiller.php > /dev/null 2>&#038;1</code></p>
<p>или </p>
<p>1) update-alternatives --config editor - выбрать в консоль редактор по умолчанию<br />
2) crontab -e<br />
3) сменить или дописать вверх  -  MAILTO=""</p>
<img src="http://feeds.feedburner.com/~r/TeaSeo/~4/8lvisPpk734" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://teaseo.ru/debian/kak-otklyuchit-otpravku-pisem-s-rezultatami-vypolneniya-cron-crontab-mailto-disable/717/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://teaseo.ru/debian/kak-otklyuchit-otpravku-pisem-s-rezultatami-vypolneniya-cron-crontab-mailto-disable/717</feedburner:origLink></item>
		<item>
		<title>Лечим головную боль копютершиков</title>
		<link>http://feedproxy.google.com/~r/TeaSeo/~3/7ZJnRG6QGR8/715</link>
		<comments>http://teaseo.ru/news/lechim-golovnuyu-bol-kopyutershikov/715#comments</comments>
		<pubDate>Sat, 14 Apr 2012 16:54:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Новости]]></category>

		<guid isPermaLink="false">http://teaseo.ru/?p=715</guid>
		<description><![CDATA[http://www.kakprosto.ru/kak-112343-kak-lechit-spazm-sosudov-golovnogo-mozga http://www.nmedik.ru/lechenie/other/golovnayabol.html]]></description>
			<content:encoded><![CDATA[<p><span id="more-715"></span></p>
<p>http://www.kakprosto.ru/kak-112343-kak-lechit-spazm-sosudov-golovnogo-mozga</p>
<p>http://www.nmedik.ru/lechenie/other/golovnayabol.html</p>
<img src="http://feeds.feedburner.com/~r/TeaSeo/~4/7ZJnRG6QGR8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://teaseo.ru/news/lechim-golovnuyu-bol-kopyutershikov/715/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://teaseo.ru/news/lechim-golovnuyu-bol-kopyutershikov/715</feedburner:origLink></item>
		<item>
		<title>Показ рекламмы пользователю не больше 3-х показов в неделю (php код)</title>
		<link>http://feedproxy.google.com/~r/TeaSeo/~3/YnA0OpCZDlE/713</link>
		<comments>http://teaseo.ru/php/pokaz-reklammy-polzovatelyu-ne-bolshe-3-x-pokazov-v-nedelyu-php-kod/713#comments</comments>
		<pubDate>Fri, 13 Apr 2012 13:41:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://teaseo.ru/?p=713</guid>
		<description><![CDATA[Суть скрипта в том, что баннер будет показыватся 3 раза при просмотре странцы сайта на протяжении недели 2-й блок выводить в шаблоне &#8230;. 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 [...]]]></description>
			<content:encoded><![CDATA[<p>Суть скрипта в том, что<br />
баннер будет показыватся 3 раза при просмотре странцы сайта на протяжении недели<br />
2-й блок выводить в шаблоне  &#8230;.<br />
<span id="more-713"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">//1-й блок ставить в верх по коду (до высылание хедеров)</span>
<span style="color: #000088;">$C_banner</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">//First Banner </span>
<span style="color: #0000cc; font-style: italic;">&lt;&lt;&lt;BannerStarEnd
&nbsp;
first banner code here
&nbsp;
BannerStarEnd</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$C_banner</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">//Second Banner</span>
<span style="color: #0000cc; font-style: italic;">&lt;&lt;&lt;BannerStarEnd
&nbsp;
second  banner code here
&nbsp;
BannerStarEnd</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;TimeLimitedBanner&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;TimeLimitedBanner&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">+=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;TimeLimitedBanner&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #990000;">setcookie</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;TimeLimitedBanner&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;TimeLimitedBanner&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">,</span> <span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">3600</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">24</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">7</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">/* expire in 1 week */</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#echo &quot;pokaz# {$_COOKIE[&quot;TimeLimitedBanner&quot;]}&lt;br&gt;&quot;;
</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;TimeLimitedBanner&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&lt;=</span> <span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$REZ_BANER</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$C_banner</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$REZ_BANER</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$C_banner</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'REZ_BANER'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$REZ_BANER</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;!--REZ_BANER#&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;TimeLimitedBanner&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;--&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//вывод рекламмы</span>
<span style="color: #b1b100;">echo</span> REZ_BANER<span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">// в нужном мечте в шаблоне выведет рекламный блок</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<img src="http://feeds.feedburner.com/~r/TeaSeo/~4/YnA0OpCZDlE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://teaseo.ru/php/pokaz-reklammy-polzovatelyu-ne-bolshe-3-x-pokazov-v-nedelyu-php-kod/713/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://teaseo.ru/php/pokaz-reklammy-polzovatelyu-ne-bolshe-3-x-pokazov-v-nedelyu-php-kod/713</feedburner:origLink></item>
		<item>
		<title>Cоветы MySQL Backup(бекапов) &amp; Migration(переноса)</title>
		<link>http://feedproxy.google.com/~r/TeaSeo/~3/bH8_P0CNVpI/709</link>
		<comments>http://teaseo.ru/linux/covety-mysql-backupbekapa-migrationperenosa/709#comments</comments>
		<pubDate>Fri, 13 Apr 2012 12:38:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://teaseo.ru/?p=709</guid>
		<description><![CDATA[Online vs. Offline backups http://www.igvita.com/2007/10/10/hands-on-mysql-backup-migration/ Online backups are often the preferred method as database downtime may be an unacceptable option. Having said that, offline backups are usually faster and less error prone as we do not have to worry about running transactions, table locks, orphaned processes, and other consistency problems. If you can afford to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Online vs. Offline backups</strong></p>
<p>http://www.igvita.com/2007/10/10/hands-on-mysql-backup-migration/</p>
<p><span id="more-709"></span><br />
Online backups are often the preferred method as database downtime may be an unacceptable option. Having said that, offline backups are usually faster and less error prone as we do not have to worry about running transactions, table locks, orphaned processes, and other consistency problems. If you can afford to have a brief period of downtime, or if you&#8217;re lucky enough to have master-slave replication, offline is the way to go.<br />
<strong>Data dump vs. Raw backups<br />
</strong><br />
A data dump results in a sequence of SQL statement which can be ran against any database to recreate the database structure and the data itself. mysqldump is the premier tool in this space, and it can be used on any table type locally and even over the network. However, data dumps incur a lot of overhead with extra SQL syntax, result in larger data files, are much more CPU intensive, and most importantly, they require a full index rebuild when the data is being restored!</p>
<p>Arguably the most efficient way to backup your database is through a raw snapshot of the MySQL files as they exist on disk. Because we are skipping all the conversion steps, the process is much more efficient than dumps. To perform a proper backup of a MyISAM table, you will have to copy the data and the index files; for InnoDB you will need to backup the entire tablespace and the associated transaction logs.<br />
mysqldump / mysqlhotcopy / mysqlsnapshot / ibbackup</p>
<p>mysqldump &#8212; (online, dump) &#8212; most commonly used tool in our toolkit. It will perform a full data dump from an online database by locking the tables and writing a hefty file to disk or a network location. It is ideally suited for small databases as the process is not very efficient.</p>
<p># typical mysql dump backup and restore usage<br />
mysqldump -u root -pPassword -x &#8212;all-databases > db_dump.sql<br />
mysql -u root -pPassword < db_dump.sql</p>
<p># dump into 'backup' folder (local machine), into two text files <data, table_structure><br />
mysqldump -T backup &#8212;fields-terminated-by=&#8217;,&#8217; database-name -u root -pPassword </p>
<p># compress the dumped data on the fly<br />
mysqldump -u root -pPassword &#8212;all-databases | bzip2 -c > db_dump.bz2</p>
<p>mysqlhotcopy &#8212; (online, raw) &#8212; will perform a full raw backup of any database consisting of ISAM or MyISAM tables. It operates by acquiring a read lock on all tables, copying them, and then releasing the lock.</p>
<p># perform an online backup into /backup/location<br />
mysqlhotcopy -u root -p password database_name /backup/location</p>
<p>mysqlsnapshot &#8212; (online, raw) &#8212; a great tool to obtain a full database snapshot of any MySQL database without taking it offline. You can configure it to compress the data, and/or provide separate tar files for each database. The only downside: MyISAM only as well.</p>
<p># save a full database snapshot of an online database into /backup/location<br />
mysqlsnapshot -u root -pPassword -s /backup/location </p>
<p># restore a snapshot<br />
tar -xvf /backup/location/db.tar</p>
<p>ibbackup &#8212; (online, raw) &#8212; will perform an online backup of InnoDB and MyISAM tables on any MySQL database. A great tool, but it comes with a price tag. Then again, if you&#8217;re a heavy InnoDB user, it may well be worth the price.</p>
<p># perform online backup of MyISAM / InnoDB tables<br />
ibbackup /etc/my.cnf /etc/ibbackup.cnf</p>
<p># restore recent backup (as configured in ibbackup.cnf)<br />
ibbackup &#8212;restore /etc/ibbackup.cnf</p>
<p>cp, scp, nc &#8212; (offline, raw) &#8212; if you can afford to take your database offline, raw backups are as simple as doing a copy, or a remote transfer to a different machine. It may sound crude, but it is arguably the safest way to get a snapshot of your data!<br />
Network backups: Netcat &#038; mysqldump</p>
<p>For full safety you should backup your data on multiple drives, and even better, on multiple computers. Thankfully, this process is remarkably simple with the help of netcat, or even mysqldump itself:</p>
<p># Replicate / populate a remote database in a single step (redirect data dump)<br />
mysqldump &#8212;opt &#8212;compress &#8212;user=username database | mysql &#8212;user=username2 &#8212;password=p2 &#8212;host=hostB -D database -C database</p>
<p># data backup with netcat<br />
  # backup recipient &#8212; listen on port 6000, write recieved data to backup.bz2<br />
  nc -l 6000 > backup.bz2</p>
<p>  # backup initiator &#8212; dump the database, compress, and send to hostB:6000<br />
  mysqldump &#8212;opt -u user1 -t database | bzip2 -c | nc -w1 hostB 6000</p>
<p>A little overwhelming at first, but once you wrap your head around online vs. offline, and raw vs. dump, it&#8217;s not all that bad. And let me tell you, once automated, you also tend to sleep far better at night!</p>
<img src="http://feeds.feedburner.com/~r/TeaSeo/~4/bH8_P0CNVpI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://teaseo.ru/linux/covety-mysql-backupbekapa-migrationperenosa/709/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://teaseo.ru/linux/covety-mysql-backupbekapa-migrationperenosa/709</feedburner:origLink></item>
		<item>
		<title>Конвертирование кодировки mysql</title>
		<link>http://feedproxy.google.com/~r/TeaSeo/~3/j-eO92Io4L4/707</link>
		<comments>http://teaseo.ru/php/konvertirovanie-kodirovki-mysql/707#comments</comments>
		<pubDate>Tue, 10 Apr 2012 09:24:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://teaseo.ru/?p=707</guid>
		<description><![CDATA[Конвертирование кодировки mysql 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 &#60;?php // Database info &#160; &#160; $dbhost = 'localhost'; $dbuser = 'support'; $dbpass = 'uI4Ew'; $dbname = 'support'; &#160; //--------------- &#160; $dbconn = mysql_connect&#40;$dbhost, $dbuser, [...]]]></description>
			<content:encoded><![CDATA[<p>Конвертирование кодировки mysql<br />
<span id="more-707"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">// Database info</span>
&nbsp;
&nbsp;
<span style="color: #000088;">$dbhost</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'localhost'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$dbuser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'support'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$dbpass</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'uI4Ew'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$dbname</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'support'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//---------------</span>
&nbsp;
<span style="color: #000088;">$dbconn</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dbhost</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dbuser</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dbpass</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$db</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dbname</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;ALTER DATABASE `&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$dbname</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$exec_sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'SHOW TABLES'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$exec_sql</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$row</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_row</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$table</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$sql</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;ALTER TABLE `&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$table</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci, CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #990000;">mysql_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dbconn</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;pre&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$sql</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<img src="http://feeds.feedburner.com/~r/TeaSeo/~4/j-eO92Io4L4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://teaseo.ru/php/konvertirovanie-kodirovki-mysql/707/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://teaseo.ru/php/konvertirovanie-kodirovki-mysql/707</feedburner:origLink></item>
		<item>
		<title>SSD  советы использования на WINDOWS 7</title>
		<link>http://feedproxy.google.com/~r/TeaSeo/~3/MS2GTeGm2e0/705</link>
		<comments>http://teaseo.ru/ssd/ssd-sovety-ispolzovaniya-na-windows-7/705#comments</comments>
		<pubDate>Mon, 09 Apr 2012 07:46:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SSD]]></category>

		<guid isPermaLink="false">http://teaseo.ru/?p=705</guid>
		<description><![CDATA[пока- что сборка ссылок http://blog.ocztechnology.com/?p=178 http://www.thg.ru/storage/ssd_tweaks/print.html http://ru.wikipedia.org/wiki/TRIM_(%D0%BA%D0%BE%D0%BC%D0%B0%D0%BD%D0%B4%D0%B0_SSD)]]></description>
			<content:encoded><![CDATA[<p><span id="more-705"></span><br />
пока- что сборка ссылок</p>
<p>http://blog.ocztechnology.com/?p=178</p>
<p>http://www.thg.ru/storage/ssd_tweaks/print.html</p>
<p>http://ru.wikipedia.org/wiki/TRIM_(%D0%BA%D0%BE%D0%BC%D0%B0%D0%BD%D0%B4%D0%B0_SSD)</p>
<img src="http://feeds.feedburner.com/~r/TeaSeo/~4/MS2GTeGm2e0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://teaseo.ru/ssd/ssd-sovety-ispolzovaniya-na-windows-7/705/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://teaseo.ru/ssd/ssd-sovety-ispolzovaniya-na-windows-7/705</feedburner:origLink></item>
		<item>
		<title>Как получить имя  домена из url пути (php) ?</title>
		<link>http://feedproxy.google.com/~r/TeaSeo/~3/55JRitCPy5c/703</link>
		<comments>http://teaseo.ru/php/kak-poluchit-imya-domena-iz-url-puti-php/703#comments</comments>
		<pubDate>Mon, 09 Apr 2012 07:45:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://teaseo.ru/?p=703</guid>
		<description><![CDATA[Получить домен из URL: parse_url($url,PHP_URL_HOST)]]></description>
			<content:encoded><![CDATA[<p><span id="more-703"></span>Получить домен из URL:</p>
<p>parse_url($url,PHP_URL_HOST)</p>
<img src="http://feeds.feedburner.com/~r/TeaSeo/~4/55JRitCPy5c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://teaseo.ru/php/kak-poluchit-imya-domena-iz-url-puti-php/703/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://teaseo.ru/php/kak-poluchit-imya-domena-iz-url-puti-php/703</feedburner:origLink></item>
		<item>
		<title>DLE Замена url на leech для всех старый новостей</title>
		<link>http://feedproxy.google.com/~r/TeaSeo/~3/NznP2BQY9LM/697</link>
		<comments>http://teaseo.ru/php/dle-zamena-url-na-leech-dlya-vsex-staryj-novostej/697#comments</comments>
		<pubDate>Fri, 06 Apr 2012 13:00:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://teaseo.ru/?p=697</guid>
		<description><![CDATA[было дело, начал писать свой скрипт, хотя оказалось что скрипт уже написан 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 [...]]]></description>
			<content:encoded><![CDATA[<p>было дело, начал писать свой скрипт,<br />
хотя оказалось что скрипт уже написан<br />
<span id="more-697"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
   <span style="color: #666666; font-style: italic;">//</span>
   <span style="color: #666666; font-style: italic;">//    Created by nick-on                                               </span>
   <span style="color: #666666; font-style: italic;">//    icq: 834361, nick-on@mail.ru, http://nick-on.ru</span>
   <span style="color: #666666; font-style: italic;">// </span>
&nbsp;
    <span style="color: #990000;">set_time_limit</span><span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">0</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #990000;">define</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;DATALIFEENGINE&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #990000;">define</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;ROOT_DIR&quot;</span><span style="color: #339933;">,</span> <span style="color: #990000;">dirname</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900; font-weight: bold;">__FILE__</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #990000;">define</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;ENGINE_DIR&quot;</span><span style="color: #339933;">,</span> ROOT_DIR <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/engine/&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">require_once</span> ROOT_DIR <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/engine/classes/mysql.php'</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #b1b100;">require_once</span> ROOT_DIR <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/engine/data/config.php'</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #b1b100;">require_once</span> ROOT_DIR <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/engine/data/dbconfig.php'</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #b1b100;">require_once</span> ROOT_DIR <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/engine/classes/parse.class.php'</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
    <span style="color: #000088;">$sql_result</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;SELECT * FROM &quot;</span> <span style="color: #339933;">.</span> PREFIX <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;_post&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$parse</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ParseFilter<span style="color: #009900;">&#40;</span><span style="color: #990000;">Array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">Array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$row</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_row</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$sql_result</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
&nbsp;
        <span style="color: #000088;">$short_story</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$parse</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">decodeBBCodes</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'short_story'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$full_story</span>  <span style="color: #339933;">=</span> <span style="color: #000088;">$parse</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">decodeBBCodes</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'full_story'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>  <span style="color: #009900; font-weight: bold;">false</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
        <span style="color: #000088;">$short_story</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;[url=&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;[leech=&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$short_story</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$full_story</span>  <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;[url=&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;[leech=&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$full_story</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
         <span style="color: #000088;">$short_story</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;[/url]&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;[/leech]&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$short_story</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         <span style="color: #000088;">$full_story</span>     <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;[/url]&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;[/leech]&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$full_story</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
          <span style="color: #000088;">$short_story</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">safesql</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$parse</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">BB_Parse</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$parse</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">process</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$short_story</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
          <span style="color: #000088;">$full_story</span>     <span style="color: #339933;">=</span> <span style="color: #000088;">$db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">safesql</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$parse</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">BB_Parse</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$parse</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">process</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$full_story</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
          <span style="color: #000088;">$db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;UPDATE &quot;</span> <span style="color: #339933;">.</span> PREFIX <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;_post SET short_story = '<span style="color: #006699; font-weight: bold;">{$short_story}</span>', full_story = '<span style="color: #006699; font-weight: bold;">{$full_story}</span>' WHERE id = '<span style="color: #006699; font-weight: bold;">{$row['id']}</span>'&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000088;">$db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">free</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>а вот что я хотел написать, 99% готово</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"> &lt;meta http-equiv=&quot;content-type&quot; content=&quot;application/xhtml+xml; charset=windows-1251&quot; /&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
&nbsp;
&nbsp;
<span style="color: #339933;">@</span><span style="color: #990000;">ob_start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">@</span><span style="color: #990000;">ob_implicit_flush</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">defined</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'E_DEPRECATED'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #339933;">@</span><span style="color: #990000;">error_reporting</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900; font-weight: bold;">E_ALL</span> ^ <span style="color: #009900; font-weight: bold;">E_WARNING</span> ^ <span style="color: #009900; font-weight: bold;">E_NOTICE</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #339933;">@</span><span style="color: #990000;">ini_set</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'error_reporting'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">E_ALL</span> ^ <span style="color: #009900; font-weight: bold;">E_WARNING</span> ^ <span style="color: #009900; font-weight: bold;">E_NOTICE</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #339933;">@</span><span style="color: #990000;">error_reporting</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900; font-weight: bold;">E_ALL</span> ^ <span style="color: #009900; font-weight: bold;">E_WARNING</span> ^ E_DEPRECATED ^ <span style="color: #009900; font-weight: bold;">E_NOTICE</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #339933;">@</span><span style="color: #990000;">ini_set</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'error_reporting'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">E_ALL</span> ^ <span style="color: #009900; font-weight: bold;">E_WARNING</span> ^ E_DEPRECATED ^ <span style="color: #009900; font-weight: bold;">E_NOTICE</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #339933;">@</span><span style="color: #990000;">ini_set</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'display_errors'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">@</span><span style="color: #990000;">ini_set</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'html_errors'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">define</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'DATALIFEENGINE'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'ROOT_DIR'</span><span style="color: #339933;">,</span> <span style="color: #990000;">dirname</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900; font-weight: bold;">__FILE__</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'ENGINE_DIR'</span><span style="color: #339933;">,</span> ROOT_DIR <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/engine'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #b1b100;">require_once</span> <span style="color: #009900;">&#40;</span>ENGINE_DIR <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/inc/include/init.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #000088;">$db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;SELECT id FROM &quot;</span> <span style="color: #339933;">.</span> PREFIX <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;_post WHERE 1&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$all_id</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$row</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_row</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$all_id</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">sizeof</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$all_id</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$n</span> <span style="color: #339933;">=</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;#<span style="color: #006699; font-weight: bold;">$n</span>#&lt;br&gt;&lt;br&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$once</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$_p1</span><span style="color: #339933;">=</span><span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$all_id</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$k</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$k</span><span style="color: #339933;">&gt;=</span><span style="color: #000088;">$n</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$k</span><span style="color: #339933;">&lt;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$n</span><span style="color: #339933;">+</span><span style="color: #000088;">$once</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$_p1</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span> <span style="color: #000088;">$id</span><span style="color: #339933;">;</span>	
	<span style="color: #009900;">&#125;</span>	
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_p1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #990000;">exit</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$_p1</span> <span style="color: #339933;">=</span> <span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">','</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_p1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;SELECT * FROM &quot;</span> <span style="color: #339933;">.</span> PREFIX <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;_post WHERE id in (<span style="color: #006699; font-weight: bold;">$_p1</span>)&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$row</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_row</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$data</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$k</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;br&gt;(<span style="color: #006699; font-weight: bold;">{$row['id']}</span>)&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;short_story&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> addLeach<span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;short_story&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;full_story&quot;</span><span style="color: #009900;">&#93;</span>  <span style="color: #339933;">=</span> addLeach<span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;full_story&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
	<span style="color: #000088;">$db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;	UPDATE &quot;</span> <span style="color: #339933;">.</span> PREFIX <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;_post 
					SET 
						`full_story`  = '{<span style="color: #006699; font-weight: bold;">$db-&gt;safesql</span>(<span style="color: #006699; font-weight: bold;">$row</span>[&quot;</span>full_story<span style="color: #0000ff;">&quot;])}',
						`short_story` = '{<span style="color: #006699; font-weight: bold;">$db-&gt;safesql</span>(<span style="color: #006699; font-weight: bold;">$row</span>[&quot;</span>short_story<span style="color: #0000ff;">&quot;])}'
				 	WHERE 
						id = <span style="color: #006699; font-weight: bold;">{$row['id']}</span>&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #990000;">sleep</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">#header ('Location: /leech_conv.php?id='. $n + $once);
</span><span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'/leech_conv.php?id='</span><span style="color: #339933;">.</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$n</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$once</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;META HTTP-EQUIV=&quot;Refresh&quot;CONTENT=&quot;0; URL='</span><span style="color: #339933;">.</span><span style="color: #000088;">$url</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">;</span> 
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> addLeach<span style="color: #009900;">&#40;</span><span style="color: #000088;">$html</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// BEGIN function addLeach</span>
&nbsp;
    <span style="color: #000088;">$html</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;#&lt;a href=[<span style="color: #000099; font-weight: bold;">\&quot;</span>'](http://|https://|ftp://|ed2k://|news://|magnet:)?(\S.+?)['<span style="color: #000099; font-weight: bold;">\&quot;</span>].*?&quot;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&gt;(.+?)&lt;/a&gt;#ie&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;\make_leech('<span style="color: #000099; font-weight: bold;">\\</span>1<span style="color: #000099; font-weight: bold;">\\</span>2', '<span style="color: #000099; font-weight: bold;">\\</span>3')&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$html</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$html</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span> <span style="color: #666666; font-style: italic;">// END function addLeach</span>
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> make_leech<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$show</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">GLOBAL</span> <span style="color: #000088;">$config</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$show</span> <span style="color: #339933;">=</span> <span style="color: #990000;">stripslashes</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$show</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$url_html</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'http_home_url'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;engine/go.php?url=&quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">rawurlencode</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">base64_encode</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$url</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$target</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'target=&quot;_blank&quot; '</span> <span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$pos</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$url</span>&quot;</span> <span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;engine/go.php?url=&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$pos</span> <span style="color: #339933;">===</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">&quot;&lt;!--dle_leech_begin--&gt;&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$url_html</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span> &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$target</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$show</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/a&gt;&lt;!--dle_leech_end--&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">&quot;&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$url</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span> &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$target</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$show</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<img src="http://feeds.feedburner.com/~r/TeaSeo/~4/NznP2BQY9LM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://teaseo.ru/php/dle-zamena-url-na-leech-dlya-vsex-staryj-novostej/697/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://teaseo.ru/php/dle-zamena-url-na-leech-dlya-vsex-staryj-novostej/697</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 2.005 seconds. --><!-- Cached page generated by WP-Super-Cache on 2012-05-18 16:02:28 --><!-- Compression = gzip -->

