Author |
Message |
igotnotime
Joined: 26 Feb 2006
Posts: 3
|
Posted: Sun Feb 26, 2006 9:16 pm |

|
I am soooooo frustrated. I keep getting the following error while trying to show a particular blog:
Code: |
Unable to open template http://www.thai-blogs.com/xmlsrv/rss.php?blog=5&cat=46, exiting |
We first thought it was the include directory. We made sure it was set properly, still got the error. So instead of using PHP Include we tried SSI, again no luck. Suddenly it worked again!
After weeks of watching the cycle, it is based on our traffic peaks. 3-4 hours per day (during our peak hours) we get the error. The problem of course is this is our peak and the 3-4 hours when we most need it to display. I would greatly appreciate some serious help on this. I am not just posting randomly and I have searched both this thread and tried the methods suggested here too, all to no avail.[/code]
|
|
|

|
 |
MacSupport
Joined: 24 Feb 2005
Posts: 648
|
Posted: Sun Feb 26, 2006 10:16 pm |

|
igotnotime wrote: |
I am soooooo frustrated. I keep getting the following error while trying to show a particular blog:
Code: |
Unable to open template http://www.thai-blogs.com/xmlsrv/rss.php?blog=5&cat=46, exiting |
We first thought it was the include directory. We made sure it was set properly, still got the error. So instead of using PHP Include we tried SSI, again no luck. Suddenly it worked again!
After weeks of watching the cycle, it is based on our traffic peaks. 3-4 hours per day (during our peak hours) we get the error. The problem of course is this is our peak and the 3-4 hours when we most need it to display. I would greatly appreciate some serious help on this. I am not just posting randomly and I have searched both this thread and tried the methods suggested here too, all to no avail.[/code]
|
First I would recommend you upgrade to the latest version, I can tell by the error you have an older one. Next, I would use rss2html.php?buildURL to ensure you have the proper URL for the feed. You can also use rss2html.php?buildURL during this peek time to see what error you are getting.
Jim
|
|
|
 
|
 |
igotnotime
Joined: 26 Feb 2006
Posts: 3
|
Posted: Sun Feb 26, 2006 11:22 pm |

|
Ok I have upgraded and now the error reads:
Code: |
Unable to open RSS Feed http://www.thai-blogs.com/xmlsrv/rss.php%3fblog%3d5%26cat%3d46 with error Couldn't resolve host 'www.thai-blogs.com', exiting |
Yet the blog site I am trying to get the data from opens just fine in my browser and even the the exact same address for the feed opens fine!
WHY???
|
|
|

|
 |
igotnotime
Joined: 26 Feb 2006
Posts: 3
|
Posted: Sun Feb 26, 2006 11:32 pm |

|
Sorry need to clarify I posted wrong...
The link mentioned in the error is the one created by the buildurl option. That does not open in my browser. But http://www.thai-blogs.com/xmlsrv/rss.php?blog=5&cat=46 does open in my browser.
But neither format of the URL will open with rss2html.
The error I get on the original URL (the one I can open in my browser is:
Code: |
Unable to open RSS Feed http://www.thai-blogs.com/xmlsrv/rss.php?blog=5&cat=46 with error Couldn't resolve host 'www.thai-blogs.com', exiting |
They look pretty similar to me. I hate long lines of code so I will shorten it as much as I can. This is my rss2html file:
Code: |
$useFopenURL = 0;
$XMLfilename = "http://www.thai-blogs.com/xmlsrv/rss.php?blog=5&cat=46";
$TEMPLATEfilename = "http://mydomain.com/sample-template.html";
$LongDateFormat = "F jS, Y";? ? // ie, "Jan 21st, 2004"
$ShortDateFormat = "m/d/Y";? ? ?// ie, "1/21/2004"
$LongTimeFormat = "H:i:s T O";? // ie, "13:24:30 EDT -0400"
$ShortTimeFormat = "h:i A";? ? ?// ie, "1:24 PM"
$allowCachingXMLFiles = 1;
if ($useFopenURL) {
? ini_set("allow_url_fopen", "1");
? ini_set("user_agent", 'FeedForAll rss2html.php v2');
}
@include("rss2html_CachingExtension.php");
if (function_exists("FeedForAll_rss2html_readFile") === FALSE) {
? Function FeedForAll_rss2html_readFile($filename, $useFopenURL, $useCaching = 0) {
? ? if ($useCaching);
? ?
? ? $GLOBALS["ERRORSTRING"] = "";
? ? $result = "";
? ? if (stristr($filename, "://")) {
? ? ? if ($useFopenURL) {
? ? ? ? if (($fd = @fopen($filename, "rb")) === FALSE) {
? ? ? ? ? return FALSE;
? ? ? ? }
? ? ? ? while (($data = fread($fd, 4096)) != "") {
? ? ? ? ? $result .= $data;
? ? ? ? }
? ? ? ? fclose($fd);
? ? ? } else {
? ? ? ? $curlHandle = curl_init();
? ? ? ? curl_setopt($curlHandle, CURLOPT_URL, $filename);
? ? ? ? curl_setopt($curlHandle, CURLOPT_HEADER, 0);
? ? ? ? curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
? ? ? ? curl_setopt($curlHandle, CURLOPT_USERAGENT, "FeedForAll rss2html.php v2");
? ? ? ? curl_setopt($curlHandle, CURLOPT_REFERER, $filename);
? ? ? ? curl_setopt($curlHandle, CURLOPT_FOLLOWLOCATION, 1);
? ? ? ? curl_setopt($curlHandle, CURLOPT_MAXREDIRS, 10);
? ? ? ? $result = curl_exec($curlHandle);
? ? ? ? if (curl_errno($curlHandle)) {
? ? ? ? ? $GLOBALS["ERRORSTRING"] = curl_error($curlHandle);
? ? ? ? ? curl_close($curlHandle);
? ? ? ? ? return FALSE;
? ? ? ? }
? ? ? ? curl_close($curlHandle);
? ? ? }
? ? } else {
? ? ? if (($fd = @fopen($filename, "rb")) === FALSE) {
? ? ? ? return FALSE;
? ? ? }
? ? ? while (($data = fread($fd, 4096)) != "") {
? ? ? ? $result .= $data;
? ? ? }
? ? ? fclose($fd);
? ? }
? ? return $result;
? }
}
|
|
|
|

|
 |
MacSupport
Joined: 24 Feb 2005
Posts: 648
|
Posted: Mon Feb 27, 2006 2:09 am |

|
igotnotime wrote: |
Ok I have upgraded and now the error reads:
Code: |
Unable to open RSS Feed http://www.thai-blogs.com/xmlsrv/rss.php%3fblog%3d5%26cat%3d46 with error Couldn't resolve host 'www.thai-blogs.com', exiting |
Yet the blog site I am trying to get the data from opens just fine in my browser and even the the exact same address for the feed opens fine!
WHY???
|
The error is very obvious. If it can't resolve www.thai-blogs.com, then that is what you have to fix first. I can not access that host from here.
Jim
|
|
|
 
|
 |
|
|