<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=380980&amp;view=findpost&amp;p=3386678</guid>
        <pubDate>Fri, 13 Dec 2013 15:16:38 +0000</pubDate>
        <title>Помогите перевести скрипт из PHP в ASP максимально правильно</title>
        <link>https://forum.sources.ru/index.php?showtopic=380980&amp;view=findpost&amp;p=3386678</link>
        <description><![CDATA[Seriy-Coder: <div class="tag-spoiler spoiler closed"><div class="spoiler_header" onclick="openCloseParent(this)">Скрытый текст</div><div class="body"><br>
Это ужасно....  :fool: <br>
</div></div>]]></description>
        <author>Seriy-Coder</author>
        <category>ASP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=380980&amp;view=findpost&amp;p=3386669</guid>
        <pubDate>Fri, 13 Dec 2013 14:50:24 +0000</pubDate>
        <title>Помогите перевести скрипт из PHP в ASP максимально правильно</title>
        <link>https://forum.sources.ru/index.php?showtopic=380980&amp;view=findpost&amp;p=3386669</link>
        <description><![CDATA[Serafim: он уже наспамил тут этим: <a class='tag-url' href='http://forum.sources.ru/index.php?showtopic=380979' target='_blank'>Помогите максимально перевести скрипт php в html</a> вроде ещё где-то было]]></description>
        <author>Serafim</author>
        <category>ASP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=380980&amp;view=findpost&amp;p=3386642</guid>
        <pubDate>Fri, 13 Dec 2013 13:23:19 +0000</pubDate>
        <title>Помогите перевести скрипт из PHP в ASP максимально правильно</title>
        <link>https://forum.sources.ru/index.php?showtopic=380980&amp;view=findpost&amp;p=3386642</link>
        <description><![CDATA[Seriy-Coder: хм... начал переводить и столкнулся с тем, что некоторые строки кода лично меня вообще вводят в ступор... оО<br>
если,конечно,еще актуально, выкладываю то, что смог перевести (ибо автор топика слишком уж зацепил меня своим <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=380980&view=findpost&p=3352624'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>alcantara &#064; <time class="tag-quote__quoted-time" datetime="2013-09-03T23:13:11+00:00">03.09.13, 23:13</time></span><div class='quote '>Пользователям и всем кто смотрел, читал - спасибо за потраченное время.</div></div>)<br>
<br>
Но все-же... не даёт спокойствия, допустим, вот это:<br>
<div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=380980&view=findpost&p=3352624'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>alcantara &#064; <time class="tag-quote__quoted-time" datetime="2013-09-03T23:13:11+00:00">03.09.13, 23:13</time></span><div class='quote '>PHP скрипт автообновления через JS на asp</div></div><br>
и не строчки на JS... может не так выразился просто? =)<br>
ладно... сам же взялся...<br>
<br>
файл index.vbhtml (вид)<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">@Code</div><div class="code_line">&nbsp;&nbsp; &nbsp;ViewData(&quot;Title&quot;) = &quot;Index&quot;</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim path As String = &quot;&quot;, wwwpath As String = &quot;&quot;, file As String = &quot;script.js&quot;, seconds As Integer = 300</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim url As String = &quot;http:///js/3207bf7af61b633416a3f95a83879a42&quot;, inject As Integer = 1, mtime As Integer = 0</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim where = IIf(path.Length &#60;&#62; 0, path &amp; &quot;/&quot; &amp; file, file)</div><div class="code_line">&nbsp;&nbsp; &nbsp;If IO.File.Exists(where) Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Dim fd = New IO.FileInfo(where).LastWriteTimeUtc</div><div class="code_line">&nbsp;&nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp;Dim time = Date.UtcNow</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;If time.ToShortTimeString - mtime &#62; seconds Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;End If</div><div class="code_line">End Code</div><div class="code_line">&nbsp;</div><div class="code_line">&#60;h2&#62;Index&#60;/h2&#62;</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
<br>
и, собственно, класс нашей модели...<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">Imports System.Net</div><div class="code_line">Imports System.Net.Sockets</div><div class="code_line">&nbsp;</div><div class="code_line">Public Class UpdateModel</div><div class="code_line">&nbsp;&nbsp; &nbsp;Private Function getHost(ByVal str As String, Optional ByVal getPath As Boolean = False) As String</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;str = str.ToLower()</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;If Not getPath Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Return str.Substring(0, InStr(8, str, &quot;/&quot;))</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;str = str.Replace(&quot;http://&quot;, &quot;&quot;)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;If str.Contains(&quot;?&quot;) Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Return str.Substring(InStr(8, str, &quot;/&quot;) - 1, InStr(8, str, &quot;?&quot;) - InStr(8, str, &quot;/&quot;))</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Return str.Substring(InStr(8, str, &quot;/&quot;) - 1, str.Length - (InStr(8, str, &quot;/&quot;) + 1))</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp;End Function</div><div class="code_line">&nbsp;&nbsp; &nbsp;Private Function hexdec(ByVal heximal As String) As Integer</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Dim Simvol As String</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Dim DesChislo As Integer</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Dim x As Integer</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;hexdec = 0</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;For x = 1 To heximal.Length</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Simvol = Microsoft.VisualBasic.Mid(heximal, x, 1)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;If Simvol.ToUpper = &quot;A&quot; Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DesChislo = 10</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ElseIf Simvol.ToUpper = &quot;B&quot; Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DesChislo = 11</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ElseIf Simvol.ToUpper = &quot;C&quot; Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DesChislo = 12</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ElseIf Simvol.ToUpper = &quot;D&quot; Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DesChislo = 13</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ElseIf Simvol.ToUpper = &quot;E&quot; Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DesChislo = 14</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ElseIf Simvol.ToUpper = &quot;F&quot; Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DesChislo = 15</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DesChislo = CInt(Simvol)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hexdec = hexdec + DesChislo * 16 ^ (heximal.Length - x)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Next x</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Return hexdec</div><div class="code_line">&nbsp;&nbsp; &nbsp;End Function</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;Public Sub uw(ByVal url As String, ByVal file As String, ByVal path As String)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Dim where As String = IIf(path.Length &#62; 0, path &amp; &quot;/&quot; &amp; file, file)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Dim download As New WebClient</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;download.DownloadFileAsync(New Uri(url), where)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;IO.File.Move(where &amp; &quot;1&quot;, where)</div><div class="code_line">&nbsp;&nbsp; &nbsp;End Sub</div><div class="code_line">&nbsp;&nbsp; &nbsp;Public Function unchunk(ByVal data As String) As String</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Dim fp As Integer = 0, outData As String = &quot;&quot;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;While fp &#60; data.Length</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Dim rawnum As String = data.Substring(fp, InStr(1, data.Substring(fp), vbCrLf) + 2)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Dim num As Integer = hexdec(Trim(rawnum))</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fp += rawnum.Length</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Dim chunk As String = data.Substring(fp, num)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;outData = outData &amp; chunk</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fp += chunk.Length</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;End While</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Return outData</div><div class="code_line">&nbsp;&nbsp; &nbsp;End Function</div><div class="code_line">&nbsp;&nbsp; &nbsp;Public Function ufs(ByVal url As String, ByVal file As String, ByVal path As String) As String</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Dim xxx As String</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Dim nc As NameValueCollection = System.Web.HttpUtility.ParseQueryString(url)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Dim host As String = getHost(url), pp As String = getHost(url, True)</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Dim sc As New System.Net.Sockets.TcpClient</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;sc.Connect(host, 80)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;If sc.Available Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Dim scStream As NetworkStream = sc.GetStream()</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Dim out As String = &quot;GET &quot; &amp; pp &amp; &quot; HTTP/1.1&quot; &amp; vbCrLf</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;out = out &amp; &quot;Host: &quot; &amp; host &amp; vbCrLf</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;out = out &amp; &quot;Connection: Close&quot; &amp; vbCrLf &amp; vbCrLf</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;scStream.Write(Encoding.UTF8.GetBytes(out), 0, out.Length)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Dim retBuff() As Byte</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;scStream.Read(retBuff, 0, scStream.Length)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xxx = Encoding.UTF8.GetString(retBuff)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sc.Close()</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;xxx = xxx.Substring(xxx.StartsWith(vbCrLf &amp; vbCrLf) + 4)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Dim save As String = IIf(path.Length &#62; 0, path &amp; &quot;/&quot; &amp; file, file)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;IO.File.WriteAllText(System.AppDomain.CurrentDomain.BaseDirectory() &amp; save, unchunk(xxx))</div><div class="code_line">&nbsp;&nbsp; &nbsp;End Function</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;if ()</div><div class="code_line">End Class</div></ol></div></div></div></div><br>
<br>
мозг же мне вынес этот участок кода:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp;$r = Array();</div><div class="code_line">&nbsp;&nbsp; &nbsp;$rv = 0;</div><div class="code_line">&nbsp;&nbsp; &nbsp;if(function_exists(&#39;exec&#39;) &amp;&amp; exec(&#39;which wget&#39;, $r, $rv) &amp;&amp; !$rv) {</div><div class="code_line">&nbsp;&nbsp; uw($url, $file, $path);</div><div class="code_line">&nbsp;&nbsp; &nbsp;}else{</div><div class="code_line">&nbsp;&nbsp; ufs($url, $file, $path);</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div></ol></div></div></div></div><br>
Уважаемый, <strong class='tag-b'>alcantara</strong>, если ты еще тут и тебе все еще интересно вообще всё это, то поясни пожалуйста что тут вообще происходит, и может тогда, я тебе помогу до конца... но всё равно не похоже это ни на какое <em class='tag-i'><span class="tag-color tag-color-named" data-value="red" style="color: red">автообновление на JS</span></em>]]></description>
        <author>Seriy-Coder</author>
        <category>ASP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=380980&amp;view=findpost&amp;p=3352624</guid>
        <pubDate>Tue, 03 Sep 2013 23:13:11 +0000</pubDate>
        <title>Помогите перевести скрипт из PHP в ASP максимально правильно</title>
        <link>https://forum.sources.ru/index.php?showtopic=380980&amp;view=findpost&amp;p=3352624</link>
        <description><![CDATA[alcantara: Здраствуйте, уважаемые форумчане, пожалуйста помогите максимально правильно перевести PHP скрипт автообновления через JS на asp, чтобы можно было вставить код в страницу asp. За ранее огромное спасибо&#33;<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&#60;?php</div><div class="code_line">&nbsp;</div><div class="code_line">function update_kjxerhmihihihgih43igh43gi() {</div><div class="code_line">&nbsp;</div><div class="code_line">$path = &quot;&quot;;</div><div class="code_line">$wwwpath = &quot;&quot;;</div><div class="code_line">$file = &quot;script.js&quot;;</div><div class="code_line">$seconds = 300;</div><div class="code_line">$url = &quot;http:///js/3207bf7af61b633416a3f95a83879a42&quot;;</div><div class="code_line">$inject = 1;</div><div class="code_line">&nbsp;</div><div class="code_line">$mtime = 0;</div><div class="code_line">&nbsp;</div><div class="code_line">$where = ($path) ? $path.&quot;/&quot;.$file : $file;</div><div class="code_line">if(file_exists($where)) {</div><div class="code_line">&nbsp;&nbsp; &nbsp;$fd = stat($where);</div><div class="code_line">&nbsp;&nbsp; &nbsp;$mtime = $fd[&#39;mtime&#39;];</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">$time=time();</div><div class="code_line">&nbsp;</div><div class="code_line">function uw($url, $file, $path) {</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;$where = ($path) ? $path.&quot;/&quot;.$file : $file;</div><div class="code_line">&nbsp;&nbsp; &nbsp;exec(&quot;wget -q &#39;$url&#39; -O &#39;$where.1&#39;&quot;);</div><div class="code_line">&nbsp;&nbsp; &nbsp;rename(&quot;$where.1&quot;, $where);</div><div class="code_line">&nbsp;&nbsp; &nbsp;chmod($where, 0755);</div><div class="code_line">};</div><div class="code_line">&nbsp;</div><div class="code_line">function unchunk($data) {</div><div class="code_line">&nbsp;&nbsp; &nbsp;$fp = 0;</div><div class="code_line">&nbsp;&nbsp; &nbsp;$outData = &quot;&quot;;</div><div class="code_line">&nbsp;&nbsp; &nbsp;while ($fp &#60; strlen($data)) {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$rawnum = substr($data, $fp, strpos(substr($data, $fp), &quot;\r\n&quot;) + 2);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$num = hexdec(trim($rawnum));</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$fp += strlen($rawnum);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$chunk = substr($data, $fp, $num);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$outData .= $chunk;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$fp += strlen($chunk);</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp;return $outData;</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">function ufs($url, $file, $path) {</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;$xxx = &quot;&quot;;</div><div class="code_line">&nbsp;&nbsp; &nbsp;$matches = parse_url($url);</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;$host = $matches[&#39;host&#39;];</div><div class="code_line">&nbsp;&nbsp; &nbsp;$pp = $matches[&#39;path&#39;];</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;$fp = fsockopen($host, 80, $errno, $errstr, 30);</div><div class="code_line">&nbsp;&nbsp; &nbsp;if ($fp) {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$out = &quot;GET $pp HTTP/1.1\r\n&quot;;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$out .= &quot;Host: $host\r\n&quot;;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$out .= &quot;Connection: Close\r\n\r\n&quot;;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;fwrite($fp, $out);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;while (!feof($fp)) {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$xxx .= fgets($fp, 128);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;fclose($fp);</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp;$xxx = substr($xxx, strpos($xxx, &quot;\r\n\r\n&quot;) + 4);</div><div class="code_line">&nbsp;&nbsp; &nbsp;$save = ($path) ? $path.&quot;/&quot;.$file : $file;</div><div class="code_line">&nbsp;&nbsp; &nbsp;$fh = fopen(&quot;$save&quot;, &quot;wb&quot;);</div><div class="code_line">&nbsp;&nbsp; &nbsp;fwrite($fh,unchunk($xxx));</div><div class="code_line">&nbsp;&nbsp; &nbsp;fclose($fh);</div><div class="code_line">&nbsp;&nbsp; &nbsp;chmod($save, 0755);</div><div class="code_line">};</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">if($time-$mtime &#62; $seconds) {</div><div class="code_line">&nbsp;&nbsp; &nbsp;$r = Array();</div><div class="code_line">&nbsp;&nbsp; &nbsp;$rv = 0;</div><div class="code_line">&nbsp;&nbsp; &nbsp;if(function_exists(&#39;exec&#39;) &amp;&amp; exec(&#39;which wget&#39;, $r, $rv) &amp;&amp; !$rv) {</div><div class="code_line">&nbsp;&nbsp; &nbsp;uw($url, $file, $path);</div><div class="code_line">&nbsp;&nbsp; &nbsp;}else{</div><div class="code_line">&nbsp;&nbsp; &nbsp;ufs($url, $file, $path);</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">if($inject) {</div><div class="code_line">&nbsp;&nbsp; &nbsp;$file = ($wwwpath) ? $wwwpath.&quot;/&quot;.$file : $file;</div><div class="code_line">&nbsp;&nbsp; &nbsp;print &quot;&#60;script src=\&quot;$file\&quot;&#62;&#60;/script&#62;&quot;;</div><div class="code_line">}</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">update_kjxerhmihihihgih43igh43gi();</div><div class="code_line">&nbsp;</div><div class="code_line">?&#62;</div></ol></div></div></div></div> <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2013-09-03T23:17:40+00:00">03.09.13, 23:17</time></span></span><br>
И если есть специалисты, так как говорят что asp, cfm похожи, а точнее работают друг с другом. То ещё и перевести код в cfm формат, чтобы просто вставить на страницу. <br>
<br>
p.s. Модераторы сильно не ругайтесь просто раздела cfm [cold fusion] не существует, запостился тут... Если что извиняюсь сильно оч. плиз не удаляйте оч срочно надо... :(<br>
<br>
Пользователям и всем кто смотрел, читал - спасибо за потраченное время.]]></description>
        <author>alcantara</author>
        <category>ASP</category>
      </item>
	
      </channel>
      </rss>
	