<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1023056" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1023056</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-equivalent-xml-http-request#comment-1141968</link>
    <description> &lt;p&gt;The ASP code is really meant to return XML but I have used it to simply write the HTML contenets returned.&lt;/p&gt;
&lt;p&gt;Thank you Mark!!&lt;/p&gt;
&lt;p&gt;- Mike&lt;/p&gt;
 </description>
     <pubDate>Wed, 03 Dec 2003 18:08:13 +0000</pubDate>
 <dc:creator>mycoolross</dc:creator>
 <guid isPermaLink="false">comment 1141968 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-equivalent-xml-http-request#comment-1141967</link>
    <description> &lt;p&gt;What does XML have to do with retrieving a URL?&lt;/p&gt;
&lt;p&gt;you could try:&lt;br /&gt;
$html = [url=http://www.php.net/manual/en/function.file-get-contents.php&quot;]file_get_contents[/url](&lt;a href=&quot;http://www.mikeross.tv/linkads/displaylinks.asp?id=2&quot; title=&quot;http://www.mikeross.tv/linkads/displaylinks.asp?id=2&quot;&gt;http://www.mikeross.tv/linkads/displaylinks.asp?id=2&lt;/a&gt;);&lt;/p&gt;
&lt;p&gt;or, if you want more control:&lt;br /&gt;
(I took this out of a function I wrote)&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$url &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;parse_url&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$url&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;br /&gt;if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;strlen&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$url&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;port&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]==&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)) &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$url&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;port&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;] = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;80&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$fp &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;fsockopen &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$url&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;host&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;], &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$url&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;port&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;], &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$errno&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$errstr&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;if (!&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$fp&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;ERROR: cannot access &#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$url&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;\n\n\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return false;&lt;br /&gt;}&lt;br /&gt;else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$tmp_path&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = (strlen(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$url&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;query&#039;])&amp;gt;0) ? \&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$url&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$url&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;query&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot; : &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$url&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;path&#039;];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$tmp_host&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = (strlen(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$url&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;port&#039;])&amp;gt;0) ? \&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$url&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;host&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$url&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;port&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot; : &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$url&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;host&#039;];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$http_request&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;GET &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$tmp_path&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; HTTP/1.0\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$http_request&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;Host: &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$tmp_host&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$http_request&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = implode(\&quot;\r\n\&quot;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$http_request&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;) . \&quot;\r\n\r\n\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fputs (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$fp&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$http_request&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (!feof(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$fp&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;)) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$http_response&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; .= fread (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$fp&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, 1024);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fclose (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$fp&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$tmp&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = strpos(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$http_response&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, \&quot;\r\n\r\n\&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$headers&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = substr(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$http_response&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, 0, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$tmp&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$data&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = substr(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$http_response&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$tmp&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;+4);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Wed, 03 Dec 2003 18:02:14 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1141967 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
