polarhome news syndication

Topics related to the Polarhome support forums. Bugs/Suggestions/Critics

Moderator: Moderators

Postby Matej » Tue Jan 25, 2005 1:28 am

Yep,

[matej@server matej]$ wget http://www.polarhome.com/forum/rss.php
--00:24:50-- http://www.polarhome.com/forum/rss.php
=> `rss.php'
Razrešuje se www.polarhome.com...81.216.198.11
Povezujem se na www.polarhome.com[81.216.198.11]:80... priključen.
HTTP zahteva poslana, čakam odgovor... 200 OK
Dolžina: nedoločen [text/xml]

[ <=> ] 40,400 29.18K/s

00:24:54 (29.14 KB/s) - `rss.php' saved [40,400]


Firefox showed les. Gzip should be on - at lest there is a

Code: Select all
// gzip_compression
//
$do_gzip_compress = FALSE;
if ( $board_config['gzip_compress'] )
{
   $phpver = phpversion();
   $useragent = (isset($_SERVER["HTTP_USER_AGENT"]) ) ? $_SERVER["HTTP_USER_AGENT"] : $HTTP_USER_AGENT;
   if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) )
   {
      if ( extension_loaded('zlib') )
      {
         ob_start('ob_gzhandler');
      }
   }
   else if ( $phpver > '4.0' )
   {
      if ( strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') )
      {
         if ( extension_loaded('zlib') )
         {
            $do_gzip_compress = TRUE;
            ob_start();
            ob_implicit_flush(0);

            header('Content-Encoding: gzip');
         }
      }
   }
}
// end gzip block

part in the rss.php. :roll:
User avatar
Matej
Forum Admin
Forum Admin
 
Posts: 365
Joined: Sun Sep 29, 2002 12:28 am
Location: Ljubljana, Slovenia

Postby DenisF » Tue Jan 25, 2005 1:40 am

True sometimes gzip is used, but not all content syndicators and for sure no php rss readers support gzip ;)
Image
[ FAQ ] :: [ Policy ] :: [ Port Forwarding Guide ] :: [ Search ]
User avatar
DenisF
Forum Admin
Forum Admin
 
Posts: 679
Joined: Mon Dec 16, 2002 9:09 pm
Location: Israhell

Postby afonic » Tue Jan 25, 2005 1:54 pm

Well tell me a spammer, but I'd like to add I am glad to see an active discussion again! This forums looked like a graveyard lately!

Oh Denis, stop finding a negative point in *everything*! Relax! Peace! :P
User avatar
afonic
Forum Admin
Forum Admin
 
Posts: 686
Joined: Tue Oct 14, 2003 11:11 pm
Location: Salonica, Greece

Postby DenisF » Tue Jan 25, 2005 2:02 pm

Das the way I am :(
Image
[ FAQ ] :: [ Policy ] :: [ Port Forwarding Guide ] :: [ Search ]
User avatar
DenisF
Forum Admin
Forum Admin
 
Posts: 679
Joined: Mon Dec 16, 2002 9:09 pm
Location: Israhell

Postby GSake » Tue Jan 25, 2005 6:42 pm

I lost the feed...

although it appears on the database I can't see it printed in the website.
this happened after I changed the cache to 1 hour from 1 day..

Is it a bug af the system I am using or do I miss something?

Can I also display rss feeds with oter encoding than iso-8859-1?

the ICONV of the php info doesn't tell much to that...
GSake
Junior Member
 
Posts: 18
Joined: Sat Jan 01, 2005 7:00 pm
Location: Hellas

Postby miker_alpha » Tue Jan 25, 2005 7:29 pm

Look for OpenVMS help on my webpage
Check for QOTD here.
Image
User avatar
miker_alpha
Moderator
Moderator
 
Posts: 256
Joined: Sat May 08, 2004 9:20 am
Location: Kibbutz Tzora, Israel

Postby GSake » Tue Jan 25, 2005 9:52 pm

nope-didn't work.
it has to do with caching I think....

anyway, thanks for the feed miker!!!
GSake
Junior Member
 
Posts: 18
Joined: Sat Jan 01, 2005 7:00 pm
Location: Hellas

Postby miker_alpha » Wed Jan 26, 2005 9:39 am

Can I also display rss feeds with oter encoding than iso-8859-1?


ans:
resource xml_parser_create ( [string encoding] )

xml_parser_create() creates a new XML parser and returns a resource handle referencing it to be used by the other XML functions.

The optional encoding specifies the character encoding for the input/output in PHP 4. Starting from PHP 5, the input encoding is automatically detected, so that the encoding parameter specifies only the output encoding. In PHP 4, the default output encoding is the same as the input charset. If empty string is passed, the parser attempts to identify which encoding the document is encoded in by looking at the heading 3 or 4 bytes. In PHP 5.0.0 and 5.0.1, the default output charset is ISO-8859-1, while in PHP 5.0.2 and upper is UTF-8. The supported encodings are ISO-8859-1, UTF-8 and US-ASCII.


HTH,
MikeR
Look for OpenVMS help on my webpage
Check for QOTD here.
Image
User avatar
miker_alpha
Moderator
Moderator
 
Posts: 256
Joined: Sat May 08, 2004 9:20 am
Location: Kibbutz Tzora, Israel

Postby GSake » Wed Jan 26, 2005 12:24 pm

I was afraid of that... thanks a lot miker!
GSake
Junior Member
 
Posts: 18
Joined: Sat Jan 01, 2005 7:00 pm
Location: Hellas

Postby GSake » Fri Jan 28, 2005 10:09 pm

Finally the problem with rss feeds is the fsockopen() disabled function.

Is it possible to have it enabled guys??

I can't get rss feeds, nor display them.

The syndication script I am using requires fsockopen() enabled...

Thanks.
GSake
Junior Member
 
Posts: 18
Joined: Sat Jan 01, 2005 7:00 pm
Location: Hellas

Postby DenisF » Sat Jan 29, 2005 12:15 am

GSake wrote:Is it possible to have it enabled guys??


No.
Image
[ FAQ ] :: [ Policy ] :: [ Port Forwarding Guide ] :: [ Search ]
User avatar
DenisF
Forum Admin
Forum Admin
 
Posts: 679
Joined: Mon Dec 16, 2002 9:09 pm
Location: Israhell

Postby GSake » Sat Jan 29, 2005 12:20 am

why?it can be done localy I think.

is there a specific reason?
GSake
Junior Member
 
Posts: 18
Joined: Sat Jan 01, 2005 7:00 pm
Location: Hellas

Postby DenisF » Sat Jan 29, 2005 2:05 am

GSake wrote:why?

Due to abuse.

GSake wrote:it can be done localy I think.

No.

GSake wrote:is there a specific reason?

There was a newspot about this on the frontpage like a year ago, but i can't find it.
anyway, sockets are disabled because of some impotent debian user who abused them.
Image
[ FAQ ] :: [ Policy ] :: [ Port Forwarding Guide ] :: [ Search ]
User avatar
DenisF
Forum Admin
Forum Admin
 
Posts: 679
Joined: Mon Dec 16, 2002 9:09 pm
Location: Israhell

Postby miker_alpha » Sat Jan 29, 2005 8:58 am

The syndication script I am using requires fsockopen() enabled...


well then, look for (or write) a different script.
I have had an easier time with a PHP RSS class written by a Dr. Timothy Sakach - truly RSS for newbies; try googling the name, as I do not recall where/when I found it.

Or roll your own, in PHP using the file() function - as far as I can make out allow_url_fopen is enabled on redhat.polarhome.com and probably on other hosts.

HTH,
MikeR
Look for OpenVMS help on my webpage
Check for QOTD here.
Image
User avatar
miker_alpha
Moderator
Moderator
 
Posts: 256
Joined: Sat May 08, 2004 9:20 am
Location: Kibbutz Tzora, Israel

Postby DenisF » Sat Jan 29, 2005 1:03 pm

tru, dat ^ :lol:
Image
[ FAQ ] :: [ Policy ] :: [ Port Forwarding Guide ] :: [ Search ]
User avatar
DenisF
Forum Admin
Forum Admin
 
Posts: 679
Joined: Mon Dec 16, 2002 9:09 pm
Location: Israhell

Postby GSake » Sat Jan 29, 2005 7:29 pm

I 'll follow your hints, thanks!!!
GSake
Junior Member
 
Posts: 18
Joined: Sat Jan 01, 2005 7:00 pm
Location: Hellas

Previous

Return to Forums

Who is online

Users browsing this forum: No registered users and 2 guests