Ошибка в коде..какая строка? - Visavi.net https://visavi.net/ RSS - Visavi.net https://visavi.net/assets/img/images/logo_small.png RSS - Visavi.net https://visavi.net/ [email protected] (admin) [email protected] (admin) Wed, 15 Jan 2025 16:04:17 +0300 <pre class="prettyprint"> $i=-1; $fid=fopen(&#039;id.txt&#039;,&#039;w&#039;); $fpage=fopen(&#039;page.txt&#039;,&#039;w&#039;); $fdir=fopen(&#039;dir.txt&#039;,&#039;w&#039;); echo $fil&#91;0]&#91;0]; foreach($fil&#91;0] as $v){ $i++; $idreg_replace(&#039;#&lt;a href=&quot;\/theme\/(.*)\/&quot;&gt;(.*)&lt;\/a&gt;#is&#039;,&#039;$1&#039;,$v); $vreg_replace(&#039;#&lt;a href=&quot;\/theme\/(.*)\/&quot;&gt;(.*)&lt;\/a&gt;#is&#039;,&#039;$2&#039;,$v); $dir=translit($v); $c&#91;0]&#91;$i]=str_replace(&#039;&#91;&#039;,&#039;&#039;,$c&#91;0]&#91;$i]); $c&#91;0]&#91;$i]=str_replace(&#039;]&#039;,&#039;&#039;,$c&#91;0]&#91;$i]); $c&#91;0]&#91;$i]=str_replace(&#039;&lt;/a&gt;&#039;,&#039;&#039;,$c&#91;0]&#91;$i]); $c&#91;0]&#91;$i]=str_replace(&#039;&lt;br/&gt;&#039;,&#039;&#039;,$c&#91;0]&#91;$i]); $c&#91;0]&#91;$i]=trim($c&#91;0]&#91;$i]); $re=&#039;&#039;.$dir.&#039;&#039;; echo $re; $page=intval($c&#91;0]&#91;$i]/10); echo &#039;&#039;.$id.&#039;-&#039;.$page.&#039;&lt;br&gt;&#039;; mkdir(&quot;$dir/&quot;); fwrite($fid,$id.&quot;\r\n&quot;); fwrite($fpage,$page.&quot;\r\n&quot;); fwrite($fdir,$re.&quot;\r\n&quot;); } fclose($fdir); fclose($fid); fclose($fpage); $fileid=file(&#039;id.txt&#039;); $filepage=file(&#039;page.txt&#039;); $filedir=file(&#039;dir.txt&#039;); $wx=-1; $wd=-1; foreach($filepage as $vpage){ $wx++; $wd++; $dir12=trim($filedir&#91;$wd]); for($i;$i&lt;$vpage;$i++){ $x=curl_init(&#039;http&#58;//rugame.mobi/theme/?page=&#039;.$i.&#039;&amp;id=&#039;.trim($fileid&#91;$wx]).&#039;&#039;); curl_setopt($x,CURLOPT_RETURNTRANSFER,1); $res=curl_exec($; $resreg_replace(&#039;#\?PHPSESSID&#91;a0-z9]{32})#isU&#039;,&#039;&#039;,$res); preg_match_all(&#039;#&lt;a href=&quot;/theme/(.*)/(.*)/&quot;&gt;Скачать&lt;/a&gt;#Uis&#039;,$res,$fil); $f=fopen(&quot;link.txt&quot;,&quot;a&quot;); foreach($fil&#91;0] as $v){ $v=str_replace(&#039;&lt;a href=&quot;&#039;,&#039;http&#58;//rugame.mobi&#039;,$v); $v=str_replace(&#039;&quot;&gt;&#039;,&#039;&#039;,$v); $v=str_replace(&#039;&lt;/a&gt;&#039;,&#039;&#039;,$v); $v=str_replace(&#039;Скачать&#039;,&#039;&#039;,$v); $v=&#039;&#039;.$dir12.&#039;|&#039;.$v.&#039;&#039;; echo &#039;&#039;.$v.&#039;&lt;br&gt;&#039;; fwrite($f,$v.&quot;\r\n&quot;); } } fclose($f); } echo &#039;&lt;a href=&quot;index.php&quot;&gt;Допарсить&lt;/a&gt;&lt;br&gt;&#039;; break; } ?&gt; </pre> <br> <em><span style="font-size:x-small">Добавлено через 00:28 сек.</span></em><br> где строчка которая отвечает за ид? то что не допускает 5 значный айди... https://visavi.net/topics/16806/291874 Ошибка в коде..какая строка? Удаленный Tue, 21 Dec 2010 14:05:01 +0300 Сообщения https://visavi.net/topics/16806/291874 <pre class="prettyprint"> &lt;? set_time_limit(0); header(&#039;Content-type&#58;text/html;charset=UTF-8&#039;); switch ($_GET&#91;&#039;a&#039;]){ default&#58; echo &#039;&lt;form name=&quot;act&quot; action=&quot;rus.php?a=act&quot; method=&quot;POST&quot;&gt; Link&#58;&lt;br&gt; &lt;input name=&quot;link&quot; type=&quot;text&quot; value=&quot;&quot;&gt; &lt;input type=&quot;submit&quot; name=&quot;&quot; value=&quot;Парсить&quot;&gt; &lt;/form&gt;&#039;; break; case &quot;act&quot;&#58; function translit($in, $r = 0) { $trans2 = array(&#039;JO&#039;, &#039;ZH&#039;, &#039;CH&#039;, &#039;SH&#039;, &#039;SCH&#039;, &#039;JE&#039;, &#039;JY&#039;, &#039;JA&#039;, &#039;jo&#039;, &#039;zh&#039;, &#039;ch&#039;, &#039;sh&#039;, &#039;sch&#039;, &#039;je&#039;, &#039;jy&#039;, &#039;ja&#039;, &#039;A&#039;, &#039;B&#039;, &#039;V&#039;, &#039;G&#039;, &#039;D&#039;, &#039;E&#039;, &#039;Z&#039;, &#039;I&#039;, &#039;J&#039;, &#039;K&#039;, &#039;L&#039;, &#039;M&#039;, &#039;N&#039;, &#039;O&#039;, &#039;P&#039;, &#039;R&#039;, &#039;S&#039;, &#039;T&#039;, &#039;U&#039;, &#039;F&#039;, &#039;H&#039;, &#039;C&#039;, &#039;q&#039;, &#039;Y&#039;, &#039;a&#039;, &#039;b&#039;, &#039;v&#039;, &#039;g&#039;, &#039;d&#039;, &#039;e&#039;, &#039;z&#039;, &#039;i&#039;, &#039;j&#039;, &#039;k&#039;, &#039;l&#039;, &#039;m&#039;, &#039;n&#039;, &#039;o&#039;, &#039;p&#039;, &#039;r&#039;, &#039;s&#039;, &#039;t&#039;, &#039;u&#039;, &#039;f&#039;, &#039;h&#039;, &#039;c&#039;, &#039;q&#039;, &#039;y&#039;, &#039;__&#039;); $trans1 = array(&#039;Ё&#039;, &#039;Ж&#039;, &#039;Ч&#039;, &#039;Ш&#039;, &#039;Щ&#039;, &#039;Э&#039;, &#039;Ю&#039;, &#039;Я&#039;, &#039;ё&#039;, &#039;ж&#039;, &#039;ч&#039;, &#039;ш&#039;, &#039;щ&#039;, &#039;э&#039;, &#039;ю&#039;, &#039;я&#039;, &#039;А&#039;, &#039;Б&#039;, &#039;В&#039;, &#039;Г&#039;, &#039;Д&#039;, &#039;Е&#039;, &#039;З&#039;, &#039;И&#039;, &#039;Й&#039;, &#039;К&#039;, &#039;Л&#039;, &#039;М&#039;, &#039;Н&#039;, &#039;О&#039;, &#039;П&#039;, &#039;Р&#039;, &#039;С&#039;, &#039;Т&#039;, &#039;У&#039;, &#039;Ф&#039;, &#039;Х&#039;, &#039;Ц&#039;, &#039;Ь&#039;, &#039;Ы&#039;, &#039;а&#039;, &#039;б&#039;, &#039;в&#039;, &#039;г&#039;, &#039;д&#039;, &#039;е&#039;, &#039;з&#039;, &#039;и&#039;, &#039;й&#039;, &#039;к&#039;, &#039;л&#039;, &#039;м&#039;, &#039;н&#039;, &#039;о&#039;, &#039;п&#039;, &#039;р&#039;, &#039;с&#039;, &#039;т&#039;, &#039;у&#039;, &#039;ф&#039;, &#039;х&#039;, &#039;ц&#039;, &#039;ь&#039;, &#039;ы&#039;, &#039;/&#039;); if ($r == 0) return str_replace($trans1, $trans2, $in); else return str_replace($trans2, $trans1, $in); } $ql=trim($_POST&#91;&#039;link&#039;]); $file=file_get_contents(&#039;&#039;.$ql.&#039;&#039;); $filereg_replace(&#039;#\?PHPSESSID&#91;a0-z9]{32})#isU&#039;,&#039;&#039;,$file); preg_match_all(&#039;#&lt;a href=&quot;/theme/(&#91;0-9]{1,7})/&quot;&gt;(.*)&lt;/a&gt;#Uis&#039;,$file,$fil); preg_match_all(&#039;#&lt;/a&gt; (.*) &lt;br/&gt;#Uis&#039;,$file,$c); </pre> https://visavi.net/topics/16806/291872 Ошибка в коде..какая строка? Удаленный Tue, 21 Dec 2010 14:04:41 +0300 Сообщения https://visavi.net/topics/16806/291872 есть 2 ссылки <a href="http://rugame.mobi/theme/24/" target="_blank" rel="nofollow">http://rugame.mobi/theme/24/</a> и <a href="http://rugame.mobi/theme/70887/" target="_blank" rel="nofollow">http://rugame.mobi/theme/70887/</a> короче парсер по первой выкачивает по второй ошибки... тоесть дело в цифре! там 2х знак а во второй ссылке 5х знак. https://visavi.net/topics/16806/291869 Ошибка в коде..какая строка? Удаленный Tue, 21 Dec 2010 14:03:27 +0300 Сообщения https://visavi.net/topics/16806/291869