1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Auto post rss amazon feed from one site to another with new affiliate link?

Discussion in 'General Scripting Chat' started by devs101, Dec 1, 2014.

  1. devs101

    devs101 Registered Member

    Joined:
    Oct 13, 2011
    Messages:
    79
    Likes Received:
    1
    Hi all, I would like to auto post from another sites rss feed onto my own. The rss feed contains around 20 amazon links each day and I would like to post these on my WP site along with my affiliate link.

    Can this be done?

    Cheers,

    Devs.
     
  2. pr250

    pr250 Junior Member

    Joined:
    Apr 7, 2010
    Messages:
    108
    Likes Received:
    23
    Are they all from the same feed, or many different feedS? the reason i ask is, if its one, you can use a simple str_replace in php, if not, you need regex.

    Search for one of the many available RSS autoposter plugins for wordpress, add this php file to your server under feed.php

    in the rss autoposter, add the feed as yourdomain.com/feed.php

    Code:
    <?php
    $variable = file_get_contents("http://theirdomain.com/rss");
    $variable = str_replace("their_amazon", "your_amazon", $variable);
    echo $variable;
    exit
    ?>