by cotum
7 replies
Why won't it work? I use Successfulhosting.com - in my settings it says PHP is turned ON.

I'm trying to add newsfeeds to thedailyfib.com

Successfulhosting says PHP is up and working fine, and going to thedailyfib.com/info.php shows that it is.

Here is the code:

<?php
$olderror_reporting =error_reporting(0);
include ("http://rssfeedreader.com/rss3/rss.php?url=http%3A%2F%2Fnews.google.com%2Fnwshp%3 Fhl%3Den%26tab%3Dwn%26q%3D%26output%3Drss&newpage= 1&chead=1&atl=1&desc=1&owncss=&eleminate=&auth=&dt s=1&width=300&max=10&tlen=0&rnd=1&bt=3&bs=Solid&nm b=&ntb=&naf=&nst=&nwd=0&nht=0&dlen=250&lstyle=1&lc =Blue&bg=White&bc=%23FF0000&spc=1&ims=&tc=&ts=11&t font=Arial,+Helvetica,+Sans-serif&rf=".$HTTP_SERVER_VARS['SERVER_NAME'].$HTTP_SERVER_VARS['PHP_SELF']."&phpout=1");
error_reporting($olderror_reporting);
?>
#nightmare #php
  • Profile picture of the author CDarklock
    Originally Posted by cotum View Post

    include ("http://rssfeedreader.com...
    My psychic powers tell me that allow_url_fopen is FALSE in your PHP configuration. You may be able to turn it on with a local php.ini; ask your hosting provider.
    Signature
    "The Golden Town is the Golden Town no longer. They have sold their pillars for brass and their temples for money, they have made coins out of their golden doors. It is become a dark town full of trouble, there is no ease in its streets, beauty has left it and the old songs are gone." - Lord Dunsany, The Messengers
    {{ DiscussionBoard.errors[931233].message }}
    • Profile picture of the author cotum
      Thanks, I looked at thedailyfib.com/info.php and you are correct.

      The problem is, my hosting company won't help at all, they just tell me to hire somebody to fix it. I found some instructions on their site about creating 3 different files and uploading them and blah blah blah - it doesn't work, either.
      {{ DiscussionBoard.errors[931345].message }}
      • Profile picture of the author CDarklock
        Originally Posted by cotum View Post

        they just tell me to hire somebody to fix it.
        In the main web directory of your site, place a file named php.ini with these two lines:

        Code:
        allow_url_fopen = 1;
        allow_url_include = 1;
        You don't need the second line unless you're running PHP 5.2 or later.
        Signature
        "The Golden Town is the Golden Town no longer. They have sold their pillars for brass and their temples for money, they have made coins out of their golden doors. It is become a dark town full of trouble, there is no ease in its streets, beauty has left it and the old songs are gone." - Lord Dunsany, The Messengers
        {{ DiscussionBoard.errors[932497].message }}
    • Profile picture of the author mywebwork
      Originally Posted by CDarklock View Post

      My psychic powers tell me that allow_url_fopen is FALSE in your PHP configuration. You may be able to turn it on with a local php.ini; ask your hosting provider.
      Those "psycic powers" of yours seem to be batting 1000 these days!



      Bill
      {{ DiscussionBoard.errors[931434].message }}
  • Profile picture of the author ryanstreet
    It may have nothing to do with your server at all. Did you copy and paste your url into a browser? After I replaced the HTTP_SERVER_VARS with appropriate variables, it shows this message:
    The URL you supplied is either not RSS or the site is down at this time. Please check the feed URL or refresh the page."); ?>

    It looks like it may be a problem with their system.

    Usually valid URL's, even dynamic ones will show an rss feed in your browser.

    Maybe it is their system. Just a thought. Sorry I couldn't be more of a help.
    Signature
    Ryan Street
    PHP Developer Specializing in WordPress and Magento
    {{ DiscussionBoard.errors[935480].message }}
  • Profile picture of the author CoderPundit
    It is not recommended to include a remote page. You have no control over it and the remote host can display whatever or execute any code using that.
    {{ DiscussionBoard.errors[937130].message }}

Trending Topics