how to put content of another blog (the posts) in my site wordpress (ex: last posts)?

0

I have a site and I want to put a feature in it that has an element where the last posts of a blog appear, but this blog is on another server. I want to post the latest posts from this blog to my site.

Is there any PHP or JavaScript code where I can do this or some plugin?

    
asked by anonymous 04.07.2017 / 16:21

1 answer

0

There are some alternatives to solve your question, but some that will be listed may not be as effective, but may be useful depending on the case.

Alternatives:

API's : This is the most suitable alternative, where data will already be formatted to work on a front-end system (like your website). It may be interesting to check if the other blog has this feature, because in this way your site can consume exactly the same information. If the site that will be consumed is not from your domain, I recommend that you contact the person responsible and ask if there is any possibility of integration.

Advantages : Fast response, little data manipulation effort, and easy management.

Disadvantage : I think most blogs do not have Front / Api separation.

Web crawler : It's like a theft that scans the HTML of another site, and can be done either by backend (getting the response of a request, and treating the HTML with a lib), or by JS (For a lib that makes asynchronous connections, and collects the required data with the node identifier.)

Advantages : "Smash branch" is very useful, depending on the case.

Disadvantage : A laborious process in data extraction, slow loading of pages, does not guarantee integrity, and if the site consumed by the crawler changes page structure, p>     

04.07.2017 / 17:01