• I have Exec-PHP plugin activated, and I’m trying to add a PHP include to a page.

    After I add the PHP include code to my WP page, the page doesn’t load. Here’s the code:

    <font size=”3″ face=”Arial”>Monthly news and updates about XYZ will be added soon. In the meantime, be sure to check out the latest XYZ news.</font>

    <?php
    include (“https://app.feeddigest.com/digest3/GBXISJAUZO.html&#8221;);
    ?>

    What am I doing wrong? Why doesn’t the page load?

Viewing 3 replies - 1 through 3 (of 3 total)
  • davidchait

    (@davidchait)

    Well, I’m not sure why exec-php isn’t working in particular (I wrote my own CG-QuickPHP to do similar, ‘small’ things…), but you can’t under most hosting environments do an ‘include’ of an external PHP page. That’s a security thing generally.

    You could use cURL, or a feed-aggregator, to grab and display either html for the former or RSS for the latter.

    -d

    Thread Starter g5

    (@g5)

    Thanks David. What’s really weird is that I have the exact same PHP include code on another WP site, and it works fine. But for some reason, it’s not working on this particular site.

    Guess I’ll look into using a different feed aggregator (not Feed Digest).

    davidchait

    (@davidchait)

    you can use a different technique to get the result.

    the ‘right answer’ is that you’re doing something bad by doing a cross-site ‘include’ statement. I’m assuming the site that works is on a completely different host?

    you can use feed digest if it exports RSS/XML, and ‘consume’ it via a WP aggregator script (like my CG-FeedRead script, or others) that will do the ‘right thing’ to grab the external content and create HTML for your site.

    -d

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP inserted into a Page’ is closed to new replies.