It is shown in this example how to receive data via API from other webpages or uCoz sites with the help of php-scripts. Script sends the request to the main page of the website by means of API and receives a list of articles. Then it selects the URL of the latest (the newest) article and sends the request to API once again. But this time it is a request for this very article. The results turn back in XMLRPC format. When the necessary article is received, the script displays its title, content, author and the link to the source on the current page. This script can be used for the cross-posting, receiving and processing data on the entries via API or for making rewrites (but after some improvement).
The source code of this example is shown below.
In the template of the page:
<div align="center"> <p> <b>This example shows the way of using the script to receive the latest article from the uCoz Official Blog</b> </p> </div> <hr> <?$PHPCODE$("http://phpexample.ucoz.com/php/example003/example003.php")?>