TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 289
  • Total: 289

RSS-feed-blocks don't work for me

Started by Cartis, January 26, 2009, 10:18:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Cartis

I am trying to use the built-in RSS-feed-function but it doesn't seem to work.
The RSS-blocks turn up empty regardless of the RSS I use.
Please help.

Link to my site: http://www.goldenhillspelaren.se
SMF version: SMF 1.1.7
TP version: 1.0.6 beta 2
Theme name and version: Mesh114
Mods installed: Treasury, SMF Gallery Lite
Related Error messages:
Cartman    idag kl. 11:09:16
http://www.goldenhillspelaren.se/index.php
2: fclose(): supplied argument is not a valid stream resource
Fil: /www/webvol7/vc/pu4cjkytr24ir0q/goldenhillspelaren.se/public_html/Sources/TPmodules.php
Rad: 1330

Cartman idag kl. 11:09:16
http://www.goldenhillspelaren.se/index.php
2: fread(): supplied argument is not a valid stream resource
Fil: /www/webvol7/vc/pu4cjkytr24ir0q/goldenhillspelaren.se/public_html/Sources/TPmodules.php
Rad: 1321

Cartman idag kl. 11:09:16
http://www.goldenhillspelaren.se/index.php
2: fopen(http://www.sportix.se/sida.php?sport=Ishockey&lag=AIK) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: no suitable wrapper could be found
Fil: /www/webvol7/vc/pu4cjkytr24ir0q/goldenhillspelaren.se/public_html/Sources/TPmodules.php
Rad: 1317

Cartman idag kl. 11:09:16
http://www.goldenhillspelaren.se/index.php
2: fopen() [<a href='function.fopen'>function.fopen</a>]: URL file-access is disabled in the server configuration
Fil: /www/webvol7/vc/pu4cjkytr24ir0q/goldenhillspelaren.se/public_html/Sources/TPmodules.php
Rad: 1317

G6Cad

Your host have closed the option on the server to fetch the feeds.
They need to set the Fopen option to ON for it to work.
I doubt they will if they have closed it as it is a security issue to have it open

If you look at the errors, you see that they have it closed, so you need to contact your host and ask them to enable the external links options.


Cartis

Thanks for the fast reply.

Isn't there any way around this?
I also have the site www.grumpygents.com with a RSS-feed that works. It is placed at the same host.

G6Cad

No way around this inside SMF or TP, TP only render the feex, it doesent make or hold the settings for it.

It's a host account issue, so if it works on the same host on another account, i cant see why they have closed it for this site your asking about.
But there is nothing we can do to help, you host needs to change the settings for your account for the site your asking about.

Cartis

#4
I talked to the support at the hotel. They have (as you say) set Fopen to OFF for security reason.
But they refer to cURL as a solution. Can anybody help me with this? I'm not really a programmer.

<?php
$ch 
curl_init();
curl_setopt($chCURLOPT_URL"http://exempel.com/filnamn.php");
curl_setopt($chCURLOPT_HEADER0);
curl_exec($ch);
curl_close($ch);
?>



Instead of file_get_contents():
<?php
$url 
"http://www.example.org/";
$ch curl_init();
curl_setopt ($chCURLOPT_URL$url);
curl_setopt ($chCURLOPT_CONNECTTIMEOUT5);
curl_setopt ($chCURLOPT_RETURNTRANSFERtrue);
$contents curl_exec($ch);
if (
curl_errno($ch)) {
  echo 
curl_error($ch);
  echo 
"\n<br />";
  
$contents '';
} else {
  
curl_close($ch);
}

if (!
is_string($contents) || !strlen($contents)) {
  echo 
"Failed to get contents.";
  
$contents '';
}

echo 
$contents;
?>



http://php.net/curl
And in Swedish: http://support.loopia.se/kb256

G6Cad

Try and use a php block and where they refer to a link, add in the rss feed link and save the block

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "the rss feed url here");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);


Du kan också få hjälp på Svenska i vår skandinaviska forum del
Translated "You can also get help in Swedsih in our Scandinavian support board"

This website is proudly hosted on Crocweb Cloud Website Hosting.