WordPress.org

Ready to get started?Download WordPress

Forums

Inserting an external website php script (8 posts)

  1. Meeker
    Member
    Posted 1 year ago #

    Hi there,

    I want to know how to insert a php script from an external website into mine. I thought this would work, but it doesn't.

    <?php include (require('http://www.example.com/example.php'); ?>

    Any ideas? Thanks...

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Include and require? You just need either.

  3. Meeker
    Member
    Posted 1 year ago #

    I have discovered that the post strips out the php code, so I am trying out the plugin http://wordpress.org/extend/plugins/allow-php-in-posts-and-pages.

  4. Meeker
    Member
    Posted 1 year ago #

    Hmmm, that did not work. The plugin was installed, but I still could not include that external code. Any ideas?

  5. Andrew
    Forum Moderator
    Posted 1 year ago #

    "Did not work", sorry, what testing method are you using to check whether it's working?

  6. Meeker
    Member
    Posted 1 year ago #

    Ok I am inserting the code into the post, e.g.
    [php] require('http://www.example.com/example.php'); [/php]

    Saving, then going to the frontend, refreshing and then checking the source code. It is still stripped out from the post.

  7. Andrew
    Forum Moderator
    Posted 1 year ago #

    Write this;

    [php] var_dump(require('http://www.example.com/example.php'));exit;  [/php]

    And see whether it returns true or false;

  8. Meeker
    Member
    Posted 1 year ago #

    Thanks for the efforts, it didnt work.

Topic Closed

This topic has been closed to new replies.

About this Topic