go8765
14.11.2013 - 00:26
óï¸ðñÿ â ýòè 2 ñòðî÷êè :
file_put_contents($id . '.htm', iconv('utf-8', 'windows-1251//IGNORE', $page));
file_put_contents($id . '.txt', iconv('utf-8', 'windows-1251//IGNORE', implode("\r\n", $lines)));
âîò ñàì ñêðèïò
http://pastebin.com/6zrA6VUDâûõëîï:
user@mine:~$ sudo php -q '/home/user/bin/vk/in/dumper.php' < /dev/null > script.log
PHP Notice: iconv(): Detected an illegal character in input string in /home/user/bin/vk/in/dumper.php on line 151
PHP Notice: iconv(): Detected an illegal character in input string in /home/user/bin/vk/in/dumper.php on line 152
PHP Notice: iconv(): Detected an illegal character in input string in /home/user/bin/vk/in/dumper.php on line 151
PHP Notice: iconv(): Detected an illegal character in input string in /home/user/bin/vk/in/dumper.php on line 152
PHP Notice: iconv(): Detected an illegal character in input string in /home/user/bin/vk/in/dumper.php on line 151
PHP Notice: iconv(): Detected an illegal character in input string in /home/user/bin/vk/in/dumper.php on line 152
user@mine:~$
ïîìîãèòå ïëèç((
go8765
14.11.2013 - 01:21
óðà. íåáîëüøàÿ ïîáåäà... â òàêîì âàðèàíòå
file_put_contents(dirname(__FILE__) . '/' .$id . '.htm', iconv('iso-8859-1', 'utf-8//IGNORE', $page));
îòäàìïèëîñü, íî êðÿêîçÿáðàìè... â âàðèàíòå
file_put_contents(dirname(__FILE__) . '/' .$id . '.htm', iconv('iso-8859-1', 'windows-1251//IGNORE', $page));
ïèøåò îïÿòü ïðî Detected an illegal character êóäà äàëüøå êîïàòü? ...
Èãîðü_Vasinsky
14.11.2013 - 08:03
Ïîáåäèòåëü))
Bug #48147 iconv with //IGNORE cuts the stringhttps://bugs.php.net/bug.php?id=48147óáåðè íàôèã //IGNORE âîîáùå
_____________
HTML, CSS (Bootstrap), JS(JQuery, ExtJS), PHP, MySQL, MSSql, Posgres, (TSql, BI OLAP, MDX), Mongo, Git, SVN, CodeIgnater, Symfony, Yii 2, JiRA, Redmine, Bitbucket, Composer, Rabbit MQ, Amazon (SQS, S3, Transcribe), Docker
go8765
14.11.2013 - 12:50
ïîìåíÿë
file_put_contents($id . '.htm', iconv('iso-8859-1', 'utf-8', $page));
íî ðåçóëüòàò âñ¸-ðàâíî íå÷èòàáåëüíûé(
è äà, çàáûë ñêàçàòü, â êîíñîëè âî âðåìÿ ðàáîòû ñêðèïòà, âûõëîï ÷èòàáåëüíûé...
go8765
14.11.2013 - 15:38
ïðèø¸ë íà ðàáîòó. òàì ñòîèò äåáèàí. òîò æå ñêðèïò, íî îøèáêè äðóãèå ïèøåò
/bin/dump$ /usr/bin/php dumper.php
PHP Notice: Undefined index: response in /home/user1/bin/dump/dumper.php on line 82
PHP Notice: Undefined index: response in /home/user1/bin/dump/dumper.php on line 83
PHP Notice: Undefined index: response in /home/user1/bin/dump/dumper.php on line 84
PHP Notice: Undefined index: response in /home/user1/bin/dump/dumper.php on line 82
PHP Notice: Undefined index: response in /home/user1/bin/dump/dumper.php on line 83
PHP Notice: Undefined index: response in /home/user1/bin/dump/dumper.php on line 84
PHP Notice: Undefined index: response in /home/user1/bin/dump/dumper.php on line 103
PHP Warning: array_values() expects parameter 1 to be array, null given in /home/user1/bin/dump/dumper.php on line 103
PHP Warning: array_reverse() expects parameter 1 to be array, null given in /home/user1/bin/dump/dumper.php on line 103
PHP Notice: Undefined index: response in /home/user1/bin/dump/dumper.php on line 113
PHP Warning: array_values() expects parameter 1 to be array, null given in /home/user1/bin/dump/dumper.php on line 113
PHP Warning: array_reverse() expects parameter 1 to be array, null given in /home/user1/bin/dump/dumper.php on line 113
PHP Warning: array_merge(): Argument #1 is not an array in /home/user1/bin/dump/dumper.php on line 113
PHP Warning: array_merge(): Argument #1 is not an array in /home/user1/bin/dump/dumper.php on line 113
PHP Warning: array_merge(): Argument #1 is not an array in /home/user1/bin/dump/dumper.php on line 113
PHP Warning: Invalid argument supplied for foreach() in /home/user1/bin/dump/dumper.php on line 119
PHP Notice: Undefined index: response in /home/user1/bin/dump/dumper.php on line 82
PHP Notice: Undefined index: response in /home/user1/bin/dump/dumper.php on line 83
PHP Notice: Undefined index: response in /home/user1/bin/dump/dumper.php on line 84
PHP Notice: iconv(): Detected an illegal character in input string in /home/user1/bin/dump/dumper.php on line 151
PHP Notice: iconv(): Detected an illegal character in input string in /home/user1/bin/dump/dumper.php on line 152
Èãîðü_Vasinsky
14.11.2013 - 15:40
äàííûå òî÷íî â iso-8859-1 ???
_____________
HTML, CSS (Bootstrap), JS(JQuery, ExtJS), PHP, MySQL, MSSql, Posgres, (TSql, BI OLAP, MDX), Mongo, Git, SVN, CodeIgnater, Symfony, Yii 2, JiRA, Redmine, Bitbucket, Composer, Rabbit MQ, Amazon (SQS, S3, Transcribe), Docker
go8765
14.11.2013 - 15:42
82 $name = $info['response'][0]['first_name']; //
83 $surname = $info['response'][0]['last_name']; // -- Ãðàááèíã èíôû î ñåáå
84 $photo = $info['response'][0]['photo']; // /
113 $messages = array_merge($messages, array_reverse(array_values($page['response'])));
119 foreach ($messages as $msg) { // Îáðàáàòûâàåì êàæäîå ñîîáùåíèå
Èãîðü_Vasinsky
14.11.2013 - 15:45
åù¸ ðàç. äàííûå â êàêîé êîäèðîâêè? èñòî÷íèê â êàêîé êîäèðîâêå?
_____________
HTML, CSS (Bootstrap), JS(JQuery, ExtJS), PHP, MySQL, MSSql, Posgres, (TSql, BI OLAP, MDX), Mongo, Git, SVN, CodeIgnater, Symfony, Yii 2, JiRA, Redmine, Bitbucket, Composer, Rabbit MQ, Amazon (SQS, S3, Transcribe), Docker
go8765
14.11.2013 - 15:46
Öèòàòà (Èãîðü_Vasinsky @ 14.11.2013 - 15:40) |
äàííûå òî÷íî â iso-8859-1 ??? |
ÿ óæå âñå èçâåñòíûå ìíå êîäèðîâêè ïåðåïðîáîâàë ïîäñòàâëÿòü.
òîëüêî êðàêîçÿáëèêè îòëè÷àëèñü... ó koi8-u áûëè ñàìûå êðàñèâûå)
go8765
14.11.2013 - 15:47
ñóäÿ ïî
<meta http-equiv="content-type" content="text/html; charset=windows-1251" />
â windows-1251 íî ïðè
file_put_contents($id . '.htm', iconv('windows-1251', 'utf-8//IGNORE', $page));
âûõëîï íå ÷èòàáåëüíûé
Èãîðü_Vasinsky
14.11.2013 - 15:50
file_put_contents($id . '.htm', iconv('windows-1251', 'utf-8', $page));
_____________
HTML, CSS (Bootstrap), JS(JQuery, ExtJS), PHP, MySQL, MSSql, Posgres, (TSql, BI OLAP, MDX), Mongo, Git, SVN, CodeIgnater, Symfony, Yii 2, JiRA, Redmine, Bitbucket, Composer, Rabbit MQ, Amazon (SQS, S3, Transcribe), Docker
go8765
14.11.2013 - 15:54
òîæå ïðîáîâàë, åù¸ â÷åðà. âñ¸-ðàâíî íå÷èòàáåëüíî
Èãîðü_Vasinsky
14.11.2013 - 15:55
ïîêàæè êóñîê òåêñòà - ÷¸ çà êðÿêîçÿáðû
_____________
HTML, CSS (Bootstrap), JS(JQuery, ExtJS), PHP, MySQL, MSSql, Posgres, (TSql, BI OLAP, MDX), Mongo, Git, SVN, CodeIgnater, Symfony, Yii 2, JiRA, Redmine, Bitbucket, Composer, Rabbit MQ, Amazon (SQS, S3, Transcribe), Docker
go8765
14.11.2013 - 15:57
Ольга Владимировна
http://vk.comПриглашаю к нам!!))
Èãîðü_Vasinsky
14.11.2013 - 15:58
â header ïðîïèøè êîäèðîâêó utf-8
<?php header(....);?>
_____________
HTML, CSS (Bootstrap), JS(JQuery, ExtJS), PHP, MySQL, MSSql, Posgres, (TSql, BI OLAP, MDX), Mongo, Git, SVN, CodeIgnater, Symfony, Yii 2, JiRA, Redmine, Bitbucket, Composer, Rabbit MQ, Amazon (SQS, S3, Transcribe), Docker
Áûñòðûé îòâåò:
Powered by dgreen
Çäåñü ðàñïîëîæåíà ïîëíàÿ âåðñèÿ ýòîé ñòðàíèöû.