If you know PHP, you might know the most common used method to request pages is cURL. Unfortunately, most of the hosting plans you can buy or get freely don't include it as an extension, so I come up to this solution. It's a fSockopen Wrapper, and it basically can just make GET/POST requests... However, one day I'll add proxy support, but I cbb now Code (PHP): <div class="php" id="{CB}" style="font-family: monospace;"><ol><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #000000; font-weight: bold;"><?php</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> </li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #808080; font-style: italic;">/*************************************************************</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #808080; font-style: italic;">* PHP fSockOpen Wrapper made by ricky92 - [email=ricky92@hotmail.it]ricky92@hotmail.it[/email] *</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #808080; font-style: italic;">**************************************************************/</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> </li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #000000; font-weight: bold;">class</span> wrapper</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0000ff;">$timeout</span> = <span style="color: #cc66cc;">5</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0000ff;">$gzip</span> = <span style="color: #000000; font-weight: bold;">true</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0000ff;">$req_headers</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0000ff;">$headers</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0000ff;">$cookies</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> </li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #000000; font-weight: bold;">function</span> get<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$url</span>, <span style="color: #0000ff;">$referer</span> = <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$vars</span> = <span style="color: #0000ff;">$this</span>-><span style="color: #006600;">get_host_file</span><span style="color: #66cc66;">(</span><span style="color: #0000ff;">$url</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$stream</span> = [url=http://www.php.net/fsockopen]<span style="color: #000066;">fsockopen</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$vars</span><span style="color: #66cc66;">[</span><span style="color: #ff0000;">'host'</span><span style="color: #66cc66;">]</span>, <span style="color: #cc66cc;">80</span>, <span style="color: #0000ff;">$errno</span>, <span style="color: #0000ff;">$errmess</span>, <span style="color: #0000ff;">$this</span>-><span style="color: #006600;">timeout</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/if]<span style="color: #b1b100;">if</span>[/url] <span style="color: #66cc66;">(</span>!<span style="color: #0000ff;">$stream</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/return]<span style="color: #b1b100;">return</span>[/url] <span style="color: #ff0000;">"Error $errno: $errmess"</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$this</span>-><span style="color: #006600;">req_headers</span> = <span style="color: #0000ff;">$this</span>-><span style="color: #006600;">build_headers</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">'GET'</span>, <span style="color: #0000ff;">$vars</span><span style="color: #66cc66;">[</span><span style="color: #ff0000;">'host'</span><span style="color: #66cc66;">]</span>, <span style="color: #0000ff;">$vars</span><span style="color: #66cc66;">[</span><span style="color: #ff0000;">'file'</span><span style="color: #66cc66;">]</span>, <span style="color: #0000ff;">$referer</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #000000; font-weight: bold;">fwrite</span><span style="color: #66cc66;">(</span><span style="color: #0000ff;">$stream</span>, <span style="color: #0000ff;">$this</span>-><span style="color: #006600;">req_headers</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$buffer</span> = <span style="color: #ff0000;">''</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/while]<span style="color: #b1b100;">while</span>[/url] <span style="color: #66cc66;">(</span>![url=http://www.php.net/feof]<span style="color: #000066;">feof</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$stream</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$buffer</span>.= <span style="color: #000000; font-weight: bold;">fgets</span><span style="color: #66cc66;">(</span><span style="color: #0000ff;">$stream</span>, <span style="color: #cc66cc;">128</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/fclose]<span style="color: #000066;">fclose</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$stream</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$parts</span> = [url=http://www.php.net/explode]<span style="color: #000066;">explode</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>, <span style="color: #0000ff;">$buffer</span>, <span style="color: #cc66cc;">2</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$parts</span> = <span style="color: #0000ff;">$this</span>-><span style="color: #006600;">check_compression</span><span style="color: #66cc66;">(</span><span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$this</span>-><span style="color: #006600;">headers</span> = <span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">]</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$this</span>-><span style="color: #006600;">parse_cookies</span><span style="color: #66cc66;">(</span><span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">]</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/if]<span style="color: #b1b100;">if</span>[/url] <span style="color: #66cc66;">(</span>[url=http://www.php.net/preg_match_all]<span style="color: #000066;">preg_match_all</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #ff0000;">'/^Location: ?(.+?)$/im'</span>, <span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">]</span>, <span style="color: #0000ff;">$matches</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/return]<span style="color: #b1b100;">return</span>[/url] <span style="color: #0000ff;">$this</span>-><span style="color: #006600;">get</span><span style="color: #66cc66;">(</span><span style="color: #0000ff;">$matches</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">]</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">]</span>, <span style="color: #0000ff;">$url</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$pos1</span> = [url=http://www.php.net/strpos]<span style="color: #000066;">strpos</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">]</span>, <span style="color: #ff0000;">'<'</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$pos2</span> = [url=http://www.php.net/strrpos]<span style="color: #000066;">strrpos</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">]</span>, <span style="color: #ff0000;">'>'</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/return]<span style="color: #b1b100;">return</span>[/url] [url=http://www.php.net/substr]<span style="color: #000066;">substr</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">]</span>, <span style="color: #0000ff;">$pos1</span>, <span style="color: #0000ff;">$pos2</span> - <span style="color: #0000ff;">$pos1</span> + <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> </li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #000000; font-weight: bold;">function</span> post<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$url</span>, <span style="color: #0000ff;">$postdata</span>, <span style="color: #0000ff;">$referer</span> = <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$vars</span> = <span style="color: #0000ff;">$this</span>-><span style="color: #006600;">get_host_file</span><span style="color: #66cc66;">(</span><span style="color: #0000ff;">$url</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$stream</span> = [url=http://www.php.net/fsockopen]<span style="color: #000066;">fsockopen</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$vars</span><span style="color: #66cc66;">[</span><span style="color: #ff0000;">'host'</span><span style="color: #66cc66;">]</span>, <span style="color: #cc66cc;">80</span>, <span style="color: #0000ff;">$errno</span>, <span style="color: #0000ff;">$errmess</span>, <span style="color: #0000ff;">$this</span>-><span style="color: #006600;">timeout</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/if]<span style="color: #b1b100;">if</span>[/url] <span style="color: #66cc66;">(</span>!<span style="color: #0000ff;">$stream</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/return]<span style="color: #b1b100;">return</span>[/url] <span style="color: #ff0000;">"Error $errno: $errmess"</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$this</span>-><span style="color: #006600;">req_headers</span> = <span style="color: #0000ff;">$this</span>-><span style="color: #006600;">build_headers</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">'POST'</span>, <span style="color: #0000ff;">$vars</span><span style="color: #66cc66;">[</span><span style="color: #ff0000;">'host'</span><span style="color: #66cc66;">]</span>, <span style="color: #0000ff;">$vars</span><span style="color: #66cc66;">[</span><span style="color: #ff0000;">'file'</span><span style="color: #66cc66;">]</span>, <span style="color: #0000ff;">$referer</span>, <span style="color: #0000ff;">$postdata</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #000000; font-weight: bold;">fwrite</span><span style="color: #66cc66;">(</span><span style="color: #0000ff;">$stream</span>, <span style="color: #0000ff;">$this</span>-><span style="color: #006600;">req_headers</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$buffer</span> = <span style="color: #ff0000;">''</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/while]<span style="color: #b1b100;">while</span>[/url] <span style="color: #66cc66;">(</span>![url=http://www.php.net/feof]<span style="color: #000066;">feof</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$stream</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$buffer</span>.= <span style="color: #000000; font-weight: bold;">fgets</span><span style="color: #66cc66;">(</span><span style="color: #0000ff;">$stream</span>, <span style="color: #cc66cc;">128</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/fclose]<span style="color: #000066;">fclose</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$stream</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$parts</span> = [url=http://www.php.net/explode]<span style="color: #000066;">explode</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>, <span style="color: #0000ff;">$buffer</span>, <span style="color: #cc66cc;">2</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$parts</span> = <span style="color: #0000ff;">$this</span>-><span style="color: #006600;">check_compression</span><span style="color: #66cc66;">(</span><span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$this</span>-><span style="color: #006600;">headers</span> = <span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">]</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$this</span>-><span style="color: #006600;">parse_cookies</span><span style="color: #66cc66;">(</span><span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">]</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/if]<span style="color: #b1b100;">if</span>[/url] <span style="color: #66cc66;">(</span>[url=http://www.php.net/preg_match_all]<span style="color: #000066;">preg_match_all</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #ff0000;">'/^Location: ?(.+?)$/im'</span>, <span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">]</span>, <span style="color: #0000ff;">$matches</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$loc</span> = <span style="color: #0000ff;">$matches</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">]</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">]</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/return]<span style="color: #b1b100;">return</span>[/url] <span style="color: #0000ff;">$this</span>-><span style="color: #006600;">get</span><span style="color: #66cc66;">(</span><span style="color: #0000ff;">$vars</span><span style="color: #66cc66;">[</span><span style="color: #ff0000;">'host'</span><span style="color: #66cc66;">]</span>.<span style="color: #66cc66;">(</span><span style="color: #66cc66;">(</span>[url=http://www.php.net/substr]<span style="color: #000066;">substr</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$loc</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">)</span> == <span style="color: #ff0000;">'/'</span><span style="color: #66cc66;">)</span> ? <span style="color: #ff0000;">''</span> : <span style="color: #ff0000;">'/'</span> <span style="color: #66cc66;">)</span>.<span style="color: #0000ff;">$loc</span>, <span style="color: #0000ff;">$url</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$pos1</span> = [url=http://www.php.net/strpos]<span style="color: #000066;">strpos</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">]</span>, <span style="color: #ff0000;">'<'</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$pos2</span> = [url=http://www.php.net/strrpos]<span style="color: #000066;">strrpos</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">]</span>, <span style="color: #ff0000;">'>'</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/return]<span style="color: #b1b100;">return</span>[/url] [url=http://www.php.net/substr]<span style="color: #000066;">substr</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">]</span>, <span style="color: #0000ff;">$pos1</span>, <span style="color: #0000ff;">$pos2</span> - <span style="color: #0000ff;">$pos1</span> + <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> </li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #000000; font-weight: bold;">function</span> check_compression<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/if]<span style="color: #b1b100;">if</span>[/url]<span style="color: #66cc66;">(</span>[url=http://www.php.net/preg_match]<span style="color: #000066;">preg_match</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #ff0000;">'/Content-Encoding: ?deflate/i'</span>, <span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">]</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/if]<span style="color: #b1b100;">if</span>[/url] <span style="color: #66cc66;">(</span>!@[url=http://www.php.net/header]<span style="color: #000066;">header</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #ff0000;">'Content-Encoding: deflate'</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">]</span> = [url=http://www.php.net/gzinflate]<span style="color: #000066;">gzinflate</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">]</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/return]<span style="color: #b1b100;">return</span>[/url] <span style="color: #0000ff;">$parts</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> </li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #000000; font-weight: bold;">function</span> get_host_file<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$url</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/if]<span style="color: #b1b100;">if</span>[/url] <span style="color: #66cc66;">(</span>[url=http://www.php.net/substr]<span style="color: #000066;">substr</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$url</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">7</span><span style="color: #66cc66;">)</span> == <span style="color: #ff0000;">'http://'</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$pos</span> = [url=http://www.php.net/strpos]<span style="color: #000066;">strpos</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$url</span>, <span style="color: #ff0000;">'/'</span>, <span style="color: #cc66cc;">8</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$host</span> = [url=http://www.php.net/substr]<span style="color: #000066;">substr</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$url</span>, <span style="color: #cc66cc;">7</span>, <span style="color: #66cc66;">(</span><span style="color: #66cc66;">(</span><span style="color: #0000ff;">$pos</span> > <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">)</span> ? <span style="color: #0000ff;">$pos</span> : [url=http://www.php.net/strlen]<span style="color: #000066;">strlen</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$url</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> - <span style="color: #cc66cc;">7</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/else]<span style="color: #b1b100;">else</span>[/url]</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$pos</span> = [url=http://www.php.net/strpos]<span style="color: #000066;">strpos</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$url</span>, <span style="color: #ff0000;">'/'</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$host</span> = [url=http://www.php.net/substr]<span style="color: #000066;">substr</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$url</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #66cc66;">(</span><span style="color: #0000ff;">$pos</span> > <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">)</span> ? <span style="color: #0000ff;">$pos</span> : [url=http://www.php.net/strlen]<span style="color: #000066;">strlen</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$url</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> </li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/if]<span style="color: #b1b100;">if</span>[/url] <span style="color: #66cc66;">(</span><span style="color: #0000ff;">$pos</span> > <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$file</span> = [url=http://www.php.net/substr]<span style="color: #000066;">substr</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$url</span>, <span style="color: #0000ff;">$pos</span>, [url=http://www.php.net/strlen]<span style="color: #000066;">strlen</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$url</span><span style="color: #66cc66;">)</span> - <span style="color: #0000ff;">$pos</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/else]<span style="color: #b1b100;">else</span>[/url]</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$file</span> = <span style="color: #ff0000;">'/'</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/return]<span style="color: #b1b100;">return</span>[/url] array<span style="color: #66cc66;">(</span><span style="color: #ff0000;">'host'</span> => <span style="color: #0000ff;">$host</span>, <span style="color: #ff0000;">'file'</span> => <span style="color: #0000ff;">$file</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> </li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #000000; font-weight: bold;">function</span> build_headers<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$method</span>, <span style="color: #0000ff;">$host</span>, <span style="color: #0000ff;">$file</span>, <span style="color: #0000ff;">$referer</span> = <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #0000ff;">$postdata</span> = <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/if]<span style="color: #b1b100;">if</span>[/url] <span style="color: #66cc66;">(</span>[url=http://www.php.net/preg_match]<span style="color: #000066;">preg_match</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #ff0000;">'/^post$/i'</span>, <span style="color: #0000ff;">$method</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span> = <span style="color: #ff0000;">"POST $file HTTP/1.1<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #ff0000;">"Host: $host<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #ff0000;">"User-Agent: {$_SERVER['HTTP_USER_AGENT']}<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #ff0000;">"Accept: {$_SERVER['HTTP_ACCEPT']}<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #ff0000;">"Accept-Language: {$_SERVER['HTTP_ACCEPT_LANGUAGE']}<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #ff0000;">"Accept-Encoding: deflate<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #ff0000;">"Accept-Charset: {$_SERVER['HTTP_ACCEPT_CHARSET']}<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #ff0000;">"Keep-Alive: 300<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #ff0000;">"Connection: keep-alive<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #66cc66;">(</span><span style="color: #0000ff;">$referer</span> !== <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">)</span> ? <span style="color: #ff0000;">"Referer: $referer<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span> : <span style="color: #ff0000;">''</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #66cc66;">(</span>[url=http://www.php.net/sizeof]<span style="color: #000066;">sizeof</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$this</span>-><span style="color: #006600;">cookies</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> ? <span style="color: #ff0000;">"Cookie: {$this->cookies}<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span> : <span style="color: #ff0000;">''</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #ff0000;">"Content-Type: application/x-www-form-urlencoded<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #ff0000;">"Content-Length: "</span>.[url=http://www.php.net/strlen]<span style="color: #000066;">strlen</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$postdata</span><span style="color: #66cc66;">)</span>.<span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #0000ff;">$postdata</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/else]<span style="color: #b1b100;">else</span>[/url]</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span> = <span style="color: #ff0000;">"GET $file HTTP/1.1<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #ff0000;">"Host: $host<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #ff0000;">"User-Agent: {$_SERVER['HTTP_USER_AGENT']}<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #ff0000;">"Accept: {$_SERVER['HTTP_ACCEPT']}<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #ff0000;">"Accept-Language: {$_SERVER['HTTP_ACCEPT_LANGUAGE']}<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #ff0000;">"Accept-Encoding: deflate<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #ff0000;">"Accept-Charset: {$_SERVER['HTTP_ACCEPT_CHARSET']}<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #ff0000;">"Keep-Alive: 300<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #ff0000;">"Connection: keep-alive<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #66cc66;">(</span><span style="color: #0000ff;">$referer</span> !== <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">)</span> ? <span style="color: #ff0000;">"Referer: $referer<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span> : <span style="color: #ff0000;">''</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #66cc66;">(</span>[url=http://www.php.net/sizeof]<span style="color: #000066;">sizeof</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$this</span>-><span style="color: #006600;">cookies</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> ? <span style="color: #ff0000;">"Cookie: {$this->cookies}<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span> : <span style="color: #ff0000;">''</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$headers</span>.= <span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> </li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/return]<span style="color: #b1b100;">return</span>[/url] <span style="color: #0000ff;">$headers</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> </li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #000000; font-weight: bold;">function</span> parse_cookies<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$res_headers</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/preg_match_all]<span style="color: #000066;">preg_match_all</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #ff0000;">'/Set-Cookie: ?(.+?)=(.+?);/i'</span>, <span style="color: #0000ff;">$res_headers</span>, <span style="color: #0000ff;">$matches</span><span style="color: #66cc66;">)</span>;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> [url=http://www.php.net/for]<span style="color: #b1b100;">for</span>[/url] <span style="color: #66cc66;">(</span><span style="color: #0000ff;">$i</span> = <span style="color: #cc66cc;">0</span>; <span style="color: #0000ff;">$i</span> < [url=http://www.php.net/sizeof]<span style="color: #000066;">sizeof</span>[/url]<span style="color: #66cc66;">(</span><span style="color: #0000ff;">$matches</span><span style="color: #66cc66;">[</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">]</span><span style="color: #66cc66;">)</span>; <span style="color: #0000ff;">$i</span>++<span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">{</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0000ff;">$this</span>-><span style="color: #006600;">cookies</span>.= <span style="color: #ff0000;">"{$matches[1][$i]}={$matches[2][$i]}; "</span>;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> </li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #66cc66;">}</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> </li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #000000; font-weight: bold;">?></span></li></ol></div>