uCoz Community Additional Services PHP and API on uCoz Basic API in uCoz (How to use basic API) |
Basic API in uCoz |
How to use basic API
GENERAL INFORMATION Basic API is an interface of data receiving from the pages of a user's website. It is a GET-only interface that allows to receive only data (pages) of website modules, i.e. it works with guest (unauthorized user) permissions. At the moment it is available in 11 modules: blog, board, dir, gb, load, news, photo, publ, stuff, forum, index. To enable API, go to Control Panel -> Settings -> Common Settings -> Allow API usage. It is disabled by default. HOW TO USE The format of the data, given to API is XML-RPC. All requests to the interface are performed by means of GET requests. You can use the function as follows: http://SITE_ADDRESS/api/MODULENAME/ANYRELPATH where: SITE_ADDRESS – the URL of a user's website where API is used; MODULENAME – website module; ANYRELPATH – any module page where API usage is allowed. So it is actually enough to add /api/ between the website address and the name of the module to use the interface (if it is enabled for the website). Example For example, in order to receive a web page: http://win.ucoz.com/news/contest_for_best_uid_me_profile/2013-12-18-17 it is enough to send a GET request to: http://win.ucoz.com/api....2-18-17 |
On my site api wont work. What is going on? I try to call page with <?$PHPCODE$("http://somewebsite.com/php/page.php")?>
and i dont get anything on my site. i used example php code http://phpexample.ucoz.com/publ/receiving_an_article/1-1-0-4 !
|
bigblog, yes,i activated in all modules. im trying to use it in provided way but i get only blank page. is there any detailed example,how to call it. wich code we need to put in html to call the api. maybe i wrong somewhere. i use like in exaple above but it wont work.
!
|
khen, It shouldn't be an issue if you have added 6 or more additional fields in the Ad Board -> Settings -> Entries -> after that you need to go to the Design section -> Editor -> Ad Board -> Page with full post text and associated comments -> add the code -> Save.
|
| |||