How to Put PHP RSS Feed To a Wordpress Pages/Sidebars/Posts problem.

enes9

Registered Member
Joined
Jun 27, 2009
Messages
84
Reaction score
17
Hello Everyone,

I have this problem about my site. I want to put a PHP RSS Feed on the pages/post/side of my site. I installed the PHP-exec plugin and got a generated PHP RSS feed script from one of RSS feed generator. But the PHP code that it generated doesn't work.

Code:
<?php
$olderror_reporting=error_reporting(0);
include ("http://rssfeedreader.com/rss3/rss.php?url=http%3A%2F%2Fnews.google.com%2Fnews%3Fq%3Dbreat%2BcancerL%26output%3Drss&newpage=1&chead=1&atl=1&desc=1&owncss=&eleminate=&auth=1&dts=1&width=300&max=5&tlen=0&rnd=1&bt=3&bs=Double&nmb=&ntb=&naf=&nst=&nwd=350&nht=200&dlen=0&lstyle=-1&lc=Blue&bg=White&bc=Gray&spc=&ims=1&tc=&ts=8&tfont=Verdana,+Arial,+Sans-serif&rf=".$HTTP_SERVER_VARS['SERVER_NAME'].$HTTP_SERVER_VARS['PHP_SELF']."&phpout=1");
error_reporting($olderror_reporting);
?>
Basically, put that code on the Text/HTML widget of Wordpress that is supported by the PHP-exec plugin.

Is this code right? Please I really need your help.

Thanks you,

enes9
 
Check if you have URL_fopen_wrappers enabled.

Also maybe change
$olderror_reporting =error_reporting(E_ALL); to $olderror_reporting=error_reporting(0);

and paste the error log.
 
Last edited:
Check if you have URL_fopen_wrappers enabled.

Also maybe change
$olderror_reporting =error_reporting(E_ALL); to $olderror_reporting=error_reporting(0);

and paste the error log.


Hello viracide,

Thank you for the response. I was really hoping someone to answer this.

Is "URL_fopen_wrappers" same as "allow_url_fopen"?


Also I tried changing the code as what you have said. What I didn't get was how to paste the error log and where to paste it to? I'm so sorry about the question, I'm a noob at php.
 
Yup it is the same. Also when you change that code, it should create a error file in the same directory and paste the error it shows if any.

Also I was reading it over again and you should replace $HTTP_SERVER_VARS with $_SERVER.

eg: $_SERVER['SERVER_NAME']; rather then $HTTP_SERVER_VARS['SERVER_NAME'];

If you want faster responses from me pm me for my MSN.
 
Hello viracide,


I tried what you said and still, there's no progress. Also I haven't seen an error generated, or if there is something generated, where can I see that, on the root directory where I installed my Wordpress?


Thank you for the response. I PMed you for the MSN.

enes9
 
Hello viracide,

I just found the error it made. Here it is:


Code:
E_STRICT
is_a(): Deprecated. Please use the instanceof operator at /hsphere/local/home/itssoeasy/************.com/wp-includes/functions.wp-scripts.php (93)
timed at 19-Feb-2010 14:09:29

E_NOTICE
Undefined index:  page at /hsphere/local/home/itssoeasy/************.com/wp-content/themes/thesis_16/lib/admin/admin.php (51)
timed at 19-Feb-2010 14:09:29

E_NOTICE
Undefined index:  thesis-google-cse-submit at /hsphere/local/home/itssoeasy/*************.com/wp-content/themes/thesis_16/lib/functions/widgets.php (157)
timed at 19-Feb-2010 14:10:07

E_NOTICE
Undefined index:  thesis-search-options-submit at /hsphere/local/home/itssoeasy/**************.com/wp-content/themes/thesis_16/lib/functions/widgets.php (57)
timed at 19-Feb-2010 14:10:07

E_NOTICE
Undefined index:  thesis-subscriptions-submit at /hsphere/local/home/itssoeasy/*******************.com/wp-content/themes/thesis_16/lib/functions/widgets.php (104)
timed at 19-Feb-2010 14:10:07
The ***********.com is the domain name of my site. I hide it for confidentiality.


What's the meaning of that error?


Thanks,

enes9
 
is_a(): Deprecated means it is the old name of the function and will someday be replaced. Are you using updated PHP version and updated Wordpress? Also I added you on MSN (*@hellokitty.com)
 
Hello viracide,


What do you mean when you say "is_a(): Deprecated means it is the old name of the function and will someday be replaced."? Is it the PHP widget that has the error?


I'm using PHP 5.2.6 and my Wordpress is 2.9.2. I installed PHP-exec 4.9 plugin but it is not compatible with WP 2.9.2. So i installed "Executable PHP widget Version 2.1".

Any suggestions?


Thank you,

enes9
 
Hello viracide,


I just figured out the solution, I just have to make allow_url_include set On on my php.ini file. The code is now working on my Wordpress site..


Thank you for the help,

Enes9
 
Glad to hear that :). I mentioned allow_url_fopen, but I guess it was allow_url_include. Sorry for any confusion
 
Back
Top