I have an Godaddy linux host and have try to insert some rss to my sites, I use this code on my php file <?php function parse_rss1($f) { error_reporting(16); $xmlfile = fopen($f, 'r'); if (!$xmlfile) return('RSS Feed down'); $readfile = fread($xmlfile ,80000); $parsefile = eregi("<item>(.*)</item>", $readfile ,$arrayreg); $filechunks = explode("<item>", $arrayreg[0]); $count = count($filechunks); echo '<font face=verdana>'; for($i=1 ; $i<=$count-1 ;$i++) { ereg("<title>(.*)</title>",$filechunks[$i], $title); ereg("<link>(.*)</link>",$filechunks[$i], $links); ereg("<description>(.*)</description>",$filechunks[$i], $description); echo str_replace('hxaxh','a',"<font style='font-size: 12px;'><hxaxh target=_blank href ='$links[1]'\>".utf8_decode($title[1])."</hxaxh></font>"); echo "<br><font color=gray style='font-size: 10px;'>".utf8_decode($description[1])."</font><BR>"; } } // $xmlfeed = 'http://www.swedehost.com/backend.php'; parse_rss1($xmlfeed); ?> But the rss dont show up, I have try to upload the sites on serval other host and there work it fine, I ask Godaddy they tell me this: Thank you for contacting online support. I apologize for the inconvenience. Please make sure you are using our proxy server for this issue. You may use the following article for more assistance with the scripting: http://help.godaddy.com/article.php?article_id=288&topic_id=&& Also note that our proxy server is http://64.202.165.130:3128 and this is what the article say: Below is a PHP script that uses CURL to obtain data from a remote system (http://www.paypal.com) and then creates a Web page based on that data. <? $URL="https://www.paypal.com"; if (isset($_GET["site"])) { $URL = $_GET["site"]; } $ch = curl_init(); echo "URL = $URL <br>\n"; curl_setopt($ch, CURLOPT_VERBOSE, 1); //curl_setopt ($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE); curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); curl_setopt ($ch, CURLOPT_PROXY,"http://64.202.165.130:3128"); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt ($ch, CURLOPT_URL, $URL); curl_setopt ($ch, CURLOPT_TIMEOUT, 120); $result = curl_exec ($ch); echo "<hr><br>\n"; echo 'Errors: ' . curl_errno($ch) . ' ' . curl_error($ch) . '<br><br>'; echo "<hr><br>\n"; curl_close ($ch); print "result - $result"; echo "<hr><br>\n"; ?> I am not sure what I shall do with this, can any body help me here ??
Sounds like the main server has a firewall to stop you connecting to external sites. They have added a proxy server so you can connect via that to the third party sites. Have you tried their script? Does it work? If so you just need to use parse_rss1($result);