<?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>Tue, 22 May 2012 13:46:48 +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>dushare.com — передача файлов</title>
		<link>http://feedproxy.google.com/~r/TeaSeo/~3/MsI1-K3lzpQ/735</link>
		<comments>http://teaseo.ru/news/dushare-com-peredacha-fajlov/735#comments</comments>
		<pubDate>Tue, 22 May 2012 13:46:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Новости]]></category>

		<guid isPermaLink="false">http://teaseo.ru/?p=735</guid>
		<description><![CDATA[dushare.com &#8212; передача файлов через любой месенджер пир ту пир )]]></description>
			<content:encoded><![CDATA[<p>dushare.com &#8212; передача файлов через любой месенджер пир ту пир )</p>
<img src="http://feeds.feedburner.com/~r/TeaSeo/~4/MsI1-K3lzpQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://teaseo.ru/news/dushare-com-peredacha-fajlov/735/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://teaseo.ru/news/dushare-com-peredacha-fajlov/735</feedburner:origLink></item>
		<item>
		<title>awk  examples and анализ лог файлов</title>
		<link>http://feedproxy.google.com/~r/TeaSeo/~3/jp-hnQoDDJo/731</link>
		<comments>http://teaseo.ru/debian/awk-examples-and-analiz-log-fajlov/731#comments</comments>
		<pubDate>Tue, 22 May 2012 13:44:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[Debian]]></category>

		<guid isPermaLink="false">http://teaseo.ru/?p=731</guid>
		<description><![CDATA[http://www.cyberciti.biz/tips/netstat-command-tutorial-examples.html анализ лог файлов http://www.the-art-of-web.com/system/logs/]]></description>
			<content:encoded><![CDATA[<p>http://www.cyberciti.biz/tips/netstat-command-tutorial-examples.html</p>
<p><span id="more-731"></span><br />
анализ лог файлов </p>
<p>http://www.the-art-of-web.com/system/logs/</p>
<img src="http://feeds.feedburner.com/~r/TeaSeo/~4/jp-hnQoDDJo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://teaseo.ru/debian/awk-examples-and-analiz-log-fajlov/731/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://teaseo.ru/debian/awk-examples-and-analiz-log-fajlov/731</feedburner:origLink></item>
		<item>
		<title>CIFS + vusolo sharing</title>
		<link>http://feedproxy.google.com/~r/TeaSeo/~3/45yJmvpgdfw/728</link>
		<comments>http://teaseo.ru/news/cifs-vusolo-sharing/728#comments</comments>
		<pubDate>Tue, 22 May 2012 13:43:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Новости]]></category>

		<guid isPermaLink="false">http://teaseo.ru/?p=728</guid>
		<description><![CDATA[mount -t cifs -o rw,soft,udp,nolock,rsize=8192,wsize=8192,iocharset=utf8,user=abc,password=def //192.168.1.5/dreamshare /var/mnt/hdd Расшаривание папки в Window XP Professional, и её последующее монтирование по CIFS к Дримбоксу Зачем это надо? Это надо вам, если у вашего Дримбокса нет жёского диска, а вы рано или поздно захотите записать какой-нибудь фильм, или наоборот - просмотреть/прослушать какие-нибудь аудио-видео файлы с компьютера, например DVD или [...]]]></description>
			<content:encoded><![CDATA[<pre language="php">
mount -t cifs -o rw,soft,udp,nolock,rsize=8192,wsize=8192,iocharset=utf8,user=abc,password=def //192.168.1.5/dreamshare /var/mnt/hdd
<span id="more-728"></span>
Расшаривание папки в Window XP Professional, и её последующее монтирование по CIFS к Дримбоксу

Зачем это надо? Это надо вам, если у вашего Дримбокса нет жёского диска, а вы рано или поздно захотите записать какой-нибудь фильм, или наоборот - просмотреть/прослушать какие-нибудь аудио-видео файлы с компьютера, например DVD или MP3, или, возможно, для решения других задач.

Что для этого надо? В первую очередь желание и внимательность. Компьютер с сетевой картой, кроссоверный сетевой кабель и Дримбокс. Также, потребуется место, много места, на жестком диске вашего компьютера.

Как это работает? На компьютере под управлением Windows XP создаётся общедоступная (расшареная) папка, ей назначаются разрешения для определенного пользователя на чтение и запись, и Дримбокс от имени этого самого пользователя монтирует (подключает) эту папку к себе в систему по сети, получая тем самым доступ к жёсткому диску вашего компьютере.

Настройка сети в данной статье не рассматривается. Предпологается, что вы уже настроили сетевое подключение между компьютером и Дримом.

Некоторые предостережения. Работая в командной строке все команды, символы и знаки препинания пишем только в английской раскладке!!! Пути к папкам и файлам в той раскладке, на языке какой они названы. Потому-как, например, русская "а" и английская "a" это совершенно разные буквы для компьютера. Также, особое внимание обращайте на пробелы. Пробел воспринимается компьютером точно также, как и другие буквы. Если в пути к папкам и файлам встречаются пробелы, то заключайте такие пути в двойные кавычки, например, как в такой команде: net share dreamshare="C:\Documents and Settings\Коля\Мои Документы\Мои Записи" /unlimited.

Сразу договоримся, что:
IP-компьютера = 192.168.0.1
IP-Дримбокса = 192.168.0.2
Расшариваемая папка = C:\dream_share
Её псевдоним = dreamshare
Пользователь = abc
Его пароль = def

Будем работать только с командной строкой. Дальше вводим команды и жмём клавишу Enter!!!

Поехали:
В Windows: Пуск -> Выполнить -> cmd.exe

Добавим юзера "abc" с паролем "def":
net user abc def /add /active:yes /passwordchg:no

(Кстати, если у вас имя пользователя записано аглицкими буквами, например Kolya, и есть пароль (также английскими или цифрами), то пользователя можно и не добавлять. Тогда, далее по тексту заменяйте "abc" и "def" на свои соответственно)

Для записи расшариваемую папку желательно создавать на скоростном винте с NTFS файловой системой и в несистемном разделе. Т.е. если у вас Windows находится в разделе C: , то папку желательно создавать в разделе D: или E: (если таковые имеются), и места в разделе должно быть побольше (20 GB и более).

Создадим папку для шары:
mkdir C:\dream_share

(Кстати, если у вас уже есть папка с видео и музыкой, можно использовать ее. Желательно, чтобы в пути к ней не было неанглийских букв и пробелов (иначе, читайте выше как это обойти). Тогда, далее по тексту заменяйте "C:\dream_share" на путь к своей папке, например "D:\Moya_Papka\Video")

Создадим подпапку, обязательную для видеозаписи:
mkdir C:\dream_share\movie

Создадим тестовый файл для проверки (на всякий случай):
echo test only - %date% > C:\dream_share\test.txt

Отключим простой доступ к общим файлам и папкам (строка длинная, но надо):
reg add "HKLM\SYSTEM\ControlSet001\Control\Lsa" /v "forceguest" /t REG_DWORD /d 0 /f

Расшарим папку и присвоим ей псевдоним dreamshare, через который Дрим будет обращаться к папке по сети:
net share dreamshare=C:\dream_share /unlimited

Разрешим юзеру "abc" подключать папку по сети и иметь к ней полный доступ (запись, чтение и т.д.):
cacls C:\dream_share /e /g abc:f

(Если команда cacls начала ругаться, то ваша расшариваемая папка находится в FAT32-разделе, и прийдётся немножко посчёлкать мышкой:

    Пуск -> Панель Управления -> Свойства папок -> закладка Вид. Снимем галку с пункта "Использовать простой доступ к общим файлам". Сохраняемся.
    Правый клик мыши на расшариваемой папке -> Свойства -> закладка Общий доступ -> кнопка Разрешения. Добавим юзера "abc" и дадим ему полный доступ. Сохраняемся.

Ну, чтож, нам осталась самая малость: подмонтировать нашу папку к Дриму и проверить всё ли работает.

Возможно, на этом этапе потребуется перезагрузить компьютер и войти опять под своей учётной записью. Хотя у меня и так проходит - без перезагрузки.

Если перезагрузились, то возращаемся в cmd.exe .

Подключимся к Дриму по Telnet, для этого наберём:
telnet 192.168.0.2

Не забыли, что 192.168.0.2 это IP-адрес вашего Дримбокса, как мы и договаривались в начале.

Вводим логин:
root

Вводим пароль (по умолчанию dreambox):
dreambox

Монтируем расшареную папку dreamshare с компьютера в папку /var/mnt/hdd на Дримбоксе от имени пользователя abc и с паролем def, возможно это займёт некоторое время:
Код:

mount -t cifs -o rw,soft,udp,nolock,rsize=8192,wsize=8192,iocharset=utf8,user=abc,password=def //192.168.0.1/dreamshare /var/mnt/hdd

Проверяем:
mount -t cifs

И получим приблизительно вот такой вывод, который говорит, папка что dreamshare смонтирована:
//192.168.0.1/dreamshare on /var/mnt/hdd type cifs (rw,nodiratime,unc=\192.168.0.1\dreamshare,usernam e=abc,rsize=8192,wsize=8192)

Посмотрим, что есть в расшареной папке:
ls -l /var/mnt/hdd

И получим содержимое /var/mnt/hdd , где есть наши созданные файл test.txt и папка movie :
drwxrwxrwx 1 root root 7 Jul 29 2008 movie
-rwsrwsrwt 1 root root 7 Jul 29 2008 test.txt

Проверим, можем ли мы создавать файлы в расшареной папке с Дримбокса:
echo "Test from Dreambox" > /var/mnt/hdd/test_box.txt

Опять проверим командой ls:
ls -l /var/mnt/hdd

Удалим тестовые файлы:
rm /var/mnt/hdd/test.txt /var/mnt/hdd/test_box.txt

Размонтируем:
umount /var/mnt/hdd

Всё!!! Сложно?

Да, чуть не забыл. Для постоянного монтирования строку:
Код:

mount -t cifs -o rw,soft,udp,nolock,rsize=8192,wsize=8192,iocharset=utf8,user=abc,password=def //192.168.0.1/dreamshare /var/mnt/hdd

можно добавить в какой-нибудь стартовый скрипт Дримбокса, или поступить стандартно:
(для Gemini: Menu -> 6 -> 5 -> 1 -> Синяя кнопка)

IP компьютера = 192.168.0.1
Тип монтирования = CIFS
Директория = dreamshare
Локальная директория = /var/mnt/hdd
Опции = rw,soft,udp,nolock,iocharset=utf8
Екстра опции = nolock,rsize=8192,wsize=8192
USER = abc
PASSWORD = def
Automount = ДА (т.е. отметить галкой)

Всё!!!

P.S. Этот метод тестировался и работает в Windows XP Pro, Windows XP Pro SP1, Windows XP Pro SP2. С Windows XP Pro SP3 и Window XP Home не тестировался, но вероятнее всего также будет работать.

vlamo
</pre>
<img src="http://feeds.feedburner.com/~r/TeaSeo/~4/45yJmvpgdfw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://teaseo.ru/news/cifs-vusolo-sharing/728/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://teaseo.ru/news/cifs-vusolo-sharing/728</feedburner:origLink></item>
		<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>
	</channel>
</rss><!-- Dynamic page generated in 1.566 seconds. --><!-- Cached page generated by WP-Super-Cache on 2012-05-22 15:57:05 --><!-- Compression = gzip -->

