<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Ask me Questions and get Answers ! &#187; php</title>
	<atom:link href="http://askmetoo.com/category/internet/web-development/php/feed" rel="self" type="application/rss+xml" />
	<link>http://askmetoo.com</link>
	<description>Ask Questions and get Answers About everything for free!</description>
	<lastBuildDate>Wed, 02 May 2012 13:39:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>memcached set max memory used</title>
		<link>http://askmetoo.com/memcached-set-max-memory-used.htm</link>
		<comments>http://askmetoo.com/memcached-set-max-memory-used.htm#comments</comments>
		<pubDate>Wed, 02 May 2012 13:39:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[memcached]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://askmetoo.com/?p=261</guid>
		<description><![CDATA[memcached -d -m 2048 -u root - this console command set max used memory of memcached is 2048 MB memcached -h memcached 1.4.5 -p TCP port number to listen on (default: 11211) -U UDP port number to listen on (default: 11211, 0 is off) -s UNIX socket path to listen on (disables network support) -a [...]]]></description>
			<content:encoded><![CDATA[<p>memcached -d -m 2048 -u root<br />
<span id="more-261"></span><br />
- this console command set max used memory of memcached is 2048 MB</p>
<p> memcached -h<br />
memcached 1.4.5<br />
-p <num>      TCP port number to listen on (default: 11211)<br />
-U <num>      UDP port number to listen on (default: 11211, 0 is off)<br />
-s <file>     UNIX socket path to listen on (disables network support)<br />
-a <mask>     access mask for UNIX socket, in octal (default: 0700)<br />
-l <ip_addr>  interface to listen on (default: INADDR_ANY, all addresses)<br />
-d            run as a daemon<br />
-r            maximize core file limit<br />
-u <username> assume identity of <username> (only when run as root)<br />
-m <num>      max memory to use for items in megabytes (default: 64 MB)<br />
-M            return error on memory exhausted (rather than removing items)<br />
-c <num>      max simultaneous connections (default: 1024)<br />
-k            lock down all paged memory.  Note that there is a<br />
              limit on how much memory you may lock.  Trying to<br />
              allocate more than that would fail, so be sure you<br />
              set the limit correctly for the user you started<br />
              the daemon with (not for -u <username> user;<br />
              under sh this is done with &#8216;ulimit -S -l NUM_KB&#8217;).<br />
-v            verbose (print errors/warnings while in event loop)<br />
-vv           very verbose (also print client commands/reponses)<br />
-vvv          extremely verbose (also print internal state transitions)<br />
-h            print this help and exit<br />
-i            print memcached and libevent license<br />
-P <file>     save PID in <file>, only used with -d option<br />
-f <factor>   chunk size growth factor (default: 1.25)<br />
-n <bytes>    minimum space allocated for key+value+flags (default: 48)<br />
-L            Try to use large memory pages (if available). Increasing<br />
              the memory page size could reduce the number of TLB misses<br />
              and improve the performance. In order to get large pages<br />
              from the OS, memcached will allocate the total item-cache<br />
              in one large chunk.<br />
-D <char>     Use <char> as the delimiter between key prefixes and IDs.<br />
              This is used for per-prefix stats reporting. The default is<br />
              &#8220;:&#8221; (colon). If this option is specified, stats collection<br />
              is turned on automatically; if not, then it may be turned on<br />
              by sending the &#8220;stats detail on&#8221; command to the server.<br />
-t <num>      number of threads to use (default: 4)<br />
-R            Maximum number of requests per event, limits the number of<br />
              requests process for a given connection to prevent<br />
              starvation (default: 20)<br />
-C            Disable use of CAS<br />
-b            Set the backlog queue limit (default: 1024)<br />
-B            Binding protocol &#8211; one of ascii, binary, or auto (default)<br />
-I            Override the size of each slab page. Adjusts max item size<br />
              (default: 1mb, min: 1k, max: 128m)</p>
]]></content:encoded>
			<wfw:commentRss>http://askmetoo.com/memcached-set-max-memory-used.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php call function on exit</title>
		<link>http://askmetoo.com/php-call-function-on-exit.htm</link>
		<comments>http://askmetoo.com/php-call-function-on-exit.htm#comments</comments>
		<pubDate>Fri, 27 Apr 2012 15:10:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://askmetoo.com/?p=256</guid>
		<description><![CDATA[you need to use http://php.net/manual/en/function.register-shutdown-function.php]]></description>
			<content:encoded><![CDATA[<p><span id="more-256"></span><br />
you need to use http://php.net/manual/en/function.register-shutdown-function.php</p>
]]></content:encoded>
			<wfw:commentRss>http://askmetoo.com/php-call-function-on-exit.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gz unzip gz file from php</title>
		<link>http://askmetoo.com/gz-unzip-gz-file-from-php.htm</link>
		<comments>http://askmetoo.com/gz-unzip-gz-file-from-php.htm#comments</comments>
		<pubDate>Wed, 21 Dec 2011 08:03:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://askmetoo.com/?p=245</guid>
		<description><![CDATA[php example code 1 2 3 4 5 6 7 8 9 10 11 12 &#60;?php function uncompress&#40;$srcName, $dstName&#41; &#123; $sfp = gzopen&#40;$srcName, &#34;rb&#34;&#41;; $fp = fopen&#40;$dstName, &#34;w&#34;&#41;; &#160; while &#40;$string = gzread&#40;$sfp, 4096&#41;&#41; &#123; fwrite&#40;$fp, $string, strlen&#40;$string&#41;&#41;; &#125; gzclose&#40;$sfp&#41;; fclose&#40;$fp&#41;; &#125; uncompress&#40;'codhacks.sql.gz','codhacks.sql'&#41;;echo 1;exit;]]></description>
			<content:encoded><![CDATA[<p>php example code<br />
<span id="more-245"></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
</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: #000000; font-weight: bold;">function</span> uncompress<span style="color: #009900;">&#40;</span><span style="color: #000088;">$srcName</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dstName</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$sfp</span> <span style="color: #339933;">=</span> <span style="color: #990000;">gzopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$srcName</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;rb&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$fp</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dstName</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;w&quot;</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;">$string</span> <span style="color: #339933;">=</span> <span style="color: #990000;">gzread</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sfp</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">4096</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #339933;">,</span> <span style="color: #000088;">$string</span><span style="color: #339933;">,</span> <span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$string</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #990000;">gzclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sfp</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
uncompress<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'codhacks.sql.gz'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'codhacks.sql'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>echo <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>exit<span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://askmetoo.com/gz-unzip-gz-file-from-php.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>preg replace html comments </title>
		<link>http://askmetoo.com/preg-replace-html-comments.htm</link>
		<comments>http://askmetoo.com/preg-replace-html-comments.htm#comments</comments>
		<pubDate>Tue, 15 Mar 2011 13:54:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://askmetoo.com/?p=209</guid>
		<description><![CDATA[How to remove all html &#60;!&#8211; &#8211;&#62; commnets ? use preg_replace("/&#60;!--.*?--&#62;/ms","",$str); or $test = "&#60;!--my comment goes here--&#62; Hello World &#60;!--------welcome--&#62;welcome"; echo  preg_replace('/\&#60;.*?\&#62;/','',$test); or preg_replace('/&#60;!--(.*)--&#62;/Uis', '', $html)]]></description>
			<content:encoded><![CDATA[<p>How to remove all html &lt;!&#8211; &#8211;&gt; commnets ?<span id="more-209"></span></p>
<p>use</p>
<pre><code>preg_replace("/&lt;!--.*?--&gt;/ms","",$str);
or
</code>
<pre><code>$test = "&lt;!--my comment goes here--&gt; Hello World &lt;!--------welcome--&gt;welcome";
echo  preg_replace('/\&lt;.*?\&gt;/','',$test);

or

</code>
<pre><code>preg_replace('/&lt;!--(.*)--&gt;/Uis', '', $html)

</code></pre>
</pre>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://askmetoo.com/preg-replace-html-comments.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Leave first image in text and cat length(howto)</title>
		<link>http://askmetoo.com/leave-first-image-in-text-and-cat-length.htm</link>
		<comments>http://askmetoo.com/leave-first-image-in-text-and-cat-length.htm#comments</comments>
		<pubDate>Wed, 28 Oct 2009 16:34:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Div]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[Place]]></category>
		<category><![CDATA[Text]]></category>

		<guid isPermaLink="false">http://askmetoo.com/?p=130</guid>
		<description><![CDATA[This simple script makes good things! 1) leave first img tag 2) remove all another img tags 3) cut text by length So you get simple text short text with one image on it. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 [...]]]></description>
			<content:encoded><![CDATA[<p>This simple script makes good things!<br />
1) leave first <strong>img</strong> tag<br />
2) remove all another <strong>img</strong> tags<br />
3) cut text by length<br />
So you get simple text short text with one image on it.</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
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
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> cut_text<span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$alli</span> <span style="color: #339933;">=</span> catch_that_image<span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</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;">$alli</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$x</span><span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$alli</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: #000088;">$alli</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>
        <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span>strip_only<span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;img&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$alli</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">700</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$x</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">700</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$y</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strrpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$x</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$y</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span> <span style="color: #0000ff;">'&gt;...'</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$x</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> catch_that_image<span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$first_img</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_match_all</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/&lt;img.+src=[\'&quot;]([^\'&quot;]+)[\'&quot;].*&gt;/i'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$x</span><span style="color: #339933;">,</span> <span style="color: #000088;">$matches</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #339933;">@</span><span style="color: #000088;">$first_img</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$matches</span> <span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000088;">$imglen</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$matches</span> <span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</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>
&nbsp;
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$matches</span> <span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</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> AND <span style="color: #000088;">$imglen</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$imgpos</span> <span style="color: #339933;">=</span> <span style="color: #990000;">stripos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">,</span> <span style="color: #000088;">$matches</span> <span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</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;">$tx</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$imgpos</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #339933;">,</span> <span style="color: #000088;">$imgpos</span><span style="color: #339933;">+</span><span style="color: #000088;">$imglen</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//Vsio krome&lt;img&gt;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$tx</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tx</span><span style="color: #339933;">,</span><span style="color: #000088;">$matches</span> <span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$imgpos</span><span style="color: #339933;">,</span> <span style="color: #000088;">$imglen</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> strip_only<span style="color: #009900;">&#40;</span><span style="color: #000088;">$str</span><span style="color: #339933;">,</span> <span style="color: #000088;">$tags</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: #339933;">!</span><span style="color: #990000;">is_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tags</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$tags</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$str</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&gt;'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span> ? <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&gt;'</span><span style="color: #339933;">,</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&lt;'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$tags</span><span style="color: #009900;">&#41;</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: #000088;">$tags</span><span style="color: #009900;">&#41;</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: #990000;">end</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tags</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #990000;">array_pop</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tags</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tags</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$tag</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$str</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#&lt;/?'</span><span style="color: #339933;">.</span><span style="color: #000088;">$tag</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'[^&gt;]*&gt;#is'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$str</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$str</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #b1b100;">echo</span> cut_text<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&lt;div class=&quot;content&quot; style=&quot;min-height: 202px;&quot;&gt;
&lt;img width=&quot;200&quot; height=&quot;200&quot; alt=&quot;Post Pic&quot; src=&quot;http://www.wprecipes.com/wp-content/uploads/2009/02/php2.jpg&quot;/&gt;
&lt;div class=&quot;pic fl&quot;&gt;
&lt;img width=&quot;200&quot; height=&quot;200&quot; alt=&quot;Post Pic&quot; src=&quot;http://www.wprecipes.com/wp-content/uploads/2009/02/php2.jpg&quot;/&gt;
&lt;/div&gt;
&lt;div class=&quot;post-title&quot;&gt;
&lt;/div&gt;
&lt;img width=&quot;200&quot; height=&quot;200&quot; alt=&quot;Post Pic&quot; src=&quot;http://www.wprecipes.com/wp-content/uploads/2009/02/php2.jpg&quot;/&gt;
&lt;div class=&quot;post-excerpt&quot;&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://askmetoo.com/leave-first-image-in-text-and-cat-length.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to code url text (links) in PHP and run on JavaScript?</title>
		<link>http://askmetoo.com/how-to-code-url-text-links-in-php-and-run-on-javascript.htm</link>
		<comments>http://askmetoo.com/how-to-code-url-text-links-in-php-and-run-on-javascript.htm#comments</comments>
		<pubDate>Fri, 22 May 2009 20:57:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Text]]></category>

		<guid isPermaLink="false">http://askmetoo.com/?p=108</guid>
		<description><![CDATA[How to code url text (links) in PHP and run on JavaScript? this is fun code must works!]]></description>
			<content:encoded><![CDATA[<p><strong>How to code url text (links) in PHP and run on JavaScript?</strong><span id="more-108"></span><br />
<code lang="php"><br />
<?<br />
$string1 = '1234567890';<br />
$string2 = array();<br />
$string = '';</p>
<p>for ($i=0; $i<strlen($string1) ;$i++ ) {<br />
    echo substr($string1, $i, 1);<br />
    $string2[]= ord($string1);<br />
}<br />
$string = implode(',', $string2);<br />
?><br />
<script>
<var e51 = String.fromCharCode(<? echo $string?>);document.write(e51)</iframe>'));
</script></p>
<p></code></p>
<p>this is fun code must works!</p>
]]></content:encoded>
			<wfw:commentRss>http://askmetoo.com/how-to-code-url-text-links-in-php-and-run-on-javascript.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP online proxy check script on web server!</title>
		<link>http://askmetoo.com/php-online-proxy-script-for-web-server.htm</link>
		<comments>http://askmetoo.com/php-online-proxy-script-for-web-server.htm#comments</comments>
		<pubDate>Tue, 17 Feb 2009 22:46:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[online]]></category>

		<guid isPermaLink="false">http://askmetoo.com/?p=56</guid>
		<description><![CDATA[So let I am introduce for you updated PHP script for online proxy checking on web server! &#60;? // Fresh proxy list takes from http://proxy-list.org/ru/index.php set_time_limit&#40;10000&#41;; &#160; $list = &#34; 60.247.2.241:8080 123.176.47.203:6588 - fine - fine &#34;; &#160; $goodproxylist = ''; &#160; function pping&#40;$a&#41; &#123; error_reporting&#40;0&#41;; $ret = 0; $z = explode&#40;&#34;:&#34;, $a&#41;; // Если [...]]]></description>
			<content:encoded><![CDATA[<h3>So let I am introduce for you updated</h3>
<h2>PHP script for  <strong>online proxy checking</strong><br />
<h2>
<h3>on web server!<br />
<h3>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>
<span style="color: #666666; font-style: italic;">// Fresh proxy list takes from http://proxy-list.org/ru/index.php</span>
<span style="color: #990000;">set_time_limit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">10000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$list</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;
60.247.2.241:8080
123.176.47.203:6588 - fine - fine
&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$goodproxylist</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> pping<span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">error_reporting</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$ret</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$z</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;:&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$a</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">// Если это прокси, то в $z должно быть 2 элемента. В идеале можно регуляркой проверить что это IP:PORT</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">2</span> <span style="color: #339933;">==</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$z</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$z</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$z</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$fo</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fsockopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$z</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">21</span><span style="color: #339933;">,</span> <span style="color: #000088;">$errno</span><span style="color: #339933;">,</span> <span style="color: #000088;">$errstr</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$ret</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
            <span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fo</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$ret</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">/******************************************************************/</span>
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">explode</span> <span style="color: #009900;">&#40;</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: #000088;">$list</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$key</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$z</span> <span style="color: #339933;">=</span><span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$z</span><span style="color: #339933;">=</span><span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$allproxy</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$z</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</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;">$allproxy</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$key</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$proxy</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$value</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$proxy</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&lt;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">continue</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">//if (!pping($value)) continue;</span>
&nbsp;
    <span style="color: #000088;">$ch</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_URL<span style="color: #339933;">,</span> <span style="color: #0000ff;">'http://iscience.ru/'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_HEADER<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: #000088;">$headers</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Accept: image/gif, image/x-bitmap, image/jpeg, image/pjpeg'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$headers</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Connection: Keep-Alive'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$headers</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Content-type: application/x-www-form-urlencoded;charset=UTF-8'</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$user_agent</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0)'</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_HTTPHEADER<span style="color: #339933;">,</span> <span style="color: #000088;">$headers</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_HEADER<span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_USERAGENT<span style="color: #339933;">,</span> <span style="color: #000088;">$user_agent</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_TIMEOUT<span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_HTTPPROXYTUNNEL<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_PROXY<span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$proxy</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span>CURLOPT_FAILONERROR<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: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">curl_error</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;Curl error #: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">curl_errno</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; - &quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">curl_error</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; - exiting.&lt;br&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;">echo</span> <span style="color: #000088;">$proxy</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' - fine&lt;br&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$goodproxylist</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$proxy</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;br&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #990000;">curl_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #339933;">@</span><span style="color: #990000;">ob_flush</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #990000;">flush</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;hr&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$goodproxylist</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;hr&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
&nbsp;
    <span style="color: #000088;">$ch</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_URL<span style="color: #339933;">,</span> <span style="color: #0000ff;">'http://www.google.com.ua/'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_TIMEOUT<span style="color: #339933;">,</span> <span style="color: #cc66cc;">300</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">curl_setopt</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_PROXY<span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;123.176.47.203:6588&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #666666; font-style: italic;">//curl_setopt($ch, CURLOPT_PROXY, 'ip:port');</span>
    <span style="color: #000088;">$xml</span> <span style="color: #339933;">=</span>  <span style="color: #990000;">curl_exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</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: #990000;">curl_error</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;Curl error #: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">curl_errno</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; - &quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">curl_error</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; - exiting.&lt;br&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;">echo</span> <span style="color: #000088;">$xml</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #990000;">curl_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$xml</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://askmetoo.com/php-online-proxy-script-for-web-server.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to define search engine bot on website (using PHP)?</title>
		<link>http://askmetoo.com/how-to-define-search-engine-bot-on-website-using-php.htm</link>
		<comments>http://askmetoo.com/how-to-define-search-engine-bot-on-website-using-php.htm#comments</comments>
		<pubDate>Tue, 27 Jan 2009 13:02:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://askmetoo.com/?p=64</guid>
		<description><![CDATA[Add to root folder of websitefile  bot.php &#60;? if &#40;strstr&#40;$_SERVER&#91;'HTTP_USER_AGENT'&#93;, 'Yandex'&#41;&#41;&#123; $bot='Yandex';&#125; else if &#40;strstr&#40;$_SERVER&#91;'HTTP_USER_AGENT'&#93;, 'Googlebot'&#41;&#41;&#123;$bot='Google';&#125; else if &#40;strstr&#40;$_SERVER&#91;'HTTP_USER_AGENT'&#93;, 'Mediapartners-Google'&#41;&#41;&#123;$bot='Mediapartners-Google (Adsense)';&#125; else if &#40;strstr&#40;$_SERVER&#91;'HTTP_USER_AGENT'&#93;, 'Slurp'&#41;&#41;&#123;$bot='Hot&#38;nbsp;Bot&#38;nbsp;search';&#125; else if &#40;strstr&#40;$_SERVER&#91;'HTTP_USER_AGENT'&#93;, 'WebCrawler'&#41;&#41;&#123;$bot='WebCrawler&#38;nbsp;search';&#125; else if &#40;strstr&#40;$_SERVER&#91;'HTTP_USER_AGENT'&#93;, 'ZyBorg'&#41;&#41;&#123;$bot='Wisenut&#38;nbsp;search';&#125; else if &#40;strstr&#40;$_SERVER&#91;'HTTP_USER_AGENT'&#93;, 'scooter'&#41;&#41;&#123;$bot='AltaVista';&#125; else if &#40;strstr&#40;$_SERVER&#91;'HTTP_USER_AGENT'&#93;, 'StackRambler'&#41;&#41;&#123;$bot='Rambler';&#125; else if &#40;strstr&#40;$_SERVER&#91;'HTTP_USER_AGENT'&#93;, 'Aport'&#41;&#41;&#123;$bot='Aport';&#125; else if &#40;strstr&#40;$_SERVER&#91;'HTTP_USER_AGENT'&#93;, 'lycos'&#41;&#41;&#123;$bot='Lycos';&#125; else if &#40;strstr&#40;$_SERVER&#91;'HTTP_USER_AGENT'&#93;, 'WebAlta'&#41;&#41;&#123;$bot='WebAlta';&#125; else if [...]]]></description>
			<content:encoded><![CDATA[<p>Add to root folder of websitefile  <strong>bot.php</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Yandex'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000088;">$bot</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'Yandex'</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Googlebot'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$bot</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'Google'</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Mediapartners-Google'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$bot</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'Mediapartners-Google (Adsense)'</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Slurp'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$bot</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'Hot&amp;nbsp;Bot&amp;nbsp;search'</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'WebCrawler'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$bot</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'WebCrawler&amp;nbsp;search'</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'ZyBorg'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$bot</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'Wisenut&amp;nbsp;search'</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'scooter'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$bot</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'AltaVista'</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>  
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'StackRambler'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$bot</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'Rambler'</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>  
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Aport'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$bot</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'Aport'</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>  
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'lycos'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$bot</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'Lycos'</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>  
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'WebAlta'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$bot</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'WebAlta'</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'yahoo'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$bot</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'Yahoo'</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'msnbot'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$bot</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'msnbot/1.0'</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'ia_archiver'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$bot</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'Alexa search engine'</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'FAST'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000088;">$bot</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'AllTheWeb'</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$bot</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: #000088;">$b_data</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;bots.txt&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$inf</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;YmdHis&quot;</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: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$day</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;d.m.Y&quot;</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: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$time</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;H:i&quot;</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: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$ip</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$REMOTE_ADDR</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$home</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_HOST'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_URI'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$b_data</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;a&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$inf</span>|<span style="color: #006699; font-weight: bold;">$day</span>|<span style="color: #006699; font-weight: bold;">$time</span>|<span style="color: #006699; font-weight: bold;">$bot</span>|<span style="color: #006699; font-weight: bold;">$ip</span>|<span style="color: #006699; font-weight: bold;">$home</span>|rn&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>This code tracks visits to your site 15 different bots. Naturally, the list can be extended &#8211; is represented by no means all of the existing ones.</p>
<p>Use it, you can read: let&#8217;s say your site has a template, and its &#8220;assembly&#8221; used files header.php ( &#8220;cap&#8221; of the site) and footer.php ( &#8220;basement&#8221;). Typically, these files are inserted at the beginning and end of each page on your site.<br />
To carried out statistics on the Hits In of SE bots in this case, you must add the file header.php following code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;bot.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Now all the bots will be tracked and kept locked in a file bots.txt on your server.<br />
PS. Do not forget to change <strong>CHMOD </strong>of <strong>bots.txt</strong> to 777</p>
]]></content:encoded>
			<wfw:commentRss>http://askmetoo.com/how-to-define-search-engine-bot-on-website-using-php.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to change chmod for folders and files recursively?</title>
		<link>http://askmetoo.com/how-to-change-chmod-for-folders-and-files-recursively.htm</link>
		<comments>http://askmetoo.com/how-to-change-chmod-for-folders-and-files-recursively.htm#comments</comments>
		<pubDate>Tue, 09 Dec 2008 08:18:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://askmetoo.com/?p=37</guid>
		<description><![CDATA[chmod for all sub folders 4770, also for siles 660 &#8230; 1 2 find /path -type f -exec chmod 660 &#123;&#125; \; find /path -type d -exec chmod 4770 &#123;&#125; \;]]></description>
			<content:encoded><![CDATA[<p>chmod for all sub folders 4770, also for siles 660 &#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span>path <span style="color: #660033;">-type</span> f <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">660</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;
<span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span>path <span style="color: #660033;">-type</span> d <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">4770</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://askmetoo.com/how-to-change-chmod-for-folders-and-files-recursively.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Wget files form FTP to another server recursively</title>
		<link>http://askmetoo.com/how-to-wget-files-form-ftp-to-another-server-recusively.htm</link>
		<comments>http://askmetoo.com/how-to-wget-files-form-ftp-to-another-server-recusively.htm#comments</comments>
		<pubDate>Thu, 04 Dec 2008 19:42:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://askmetoo.com/?p=34</guid>
		<description><![CDATA[easy so this code &#8230; wget: download to ./tmp2 dir from ftp /foldername dir 20 &#8211; dir length from main url 1 wget -r -l20 -P./tmp2 ftp://login:pas@servername/foldername]]></description>
			<content:encoded><![CDATA[<p>easy<br />
so this code &#8230;<br />
wget:<br />
download to  <strong>./tmp2</strong> dir<br />
from ftp <strong>/foldername</strong> dir<br />
20 &#8211; dir length from main url</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-r</span> <span style="color: #660033;">-l20</span> -P.<span style="color: #000000; font-weight: bold;">/</span>tmp2 <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span><span style="color: #c20cb9; font-weight: bold;">login</span>:pas<span style="color: #000000; font-weight: bold;">@</span>servername<span style="color: #000000; font-weight: bold;">/</span>foldername</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://askmetoo.com/how-to-wget-files-form-ftp-to-another-server-recusively.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

