PHP and API on uCoz
Our web service has a solution that allows you to use PHP and interact with scripts with the main system. An initial API is also implemented , which can be used both for scripts and for something else, for the same mobile applications. In the near future, this functionality will undergo a “battle test”, and in the future it will develop in accordance with demand and needs.
Among other things, the interest may lie in one more thing: if you believe the statistics of Yandex (and Google), and you can believe it, then at the request of “scripts”, they are primarily looking for “scripts for yukoz”.
Until today, JS scripts have been searched in this way for all kinds of chips on their sites, sometimes, however, quite serious and necessary features. Now, obviously, php scripts sharpened by Yukoz will also begin to search, and this may already be much more serious solutions. Which obviously can not only be distributed, but also sold. I hope that a certain market will eventually form.
I hope the audience at the hub will find the information interesting, and I count on criticism and suggestions on this subject.
And yet, for the sake of bragging, I note that for SaaS products we are pioneers in this type of solution, it’s interesting to see for yourself what comes of it. But it seems to us that it should turn out interesting and useful.
For those who are interested in those. details “on the spot”:
How does it look in practice?
Consider an example script that stores any additional information about the user. The script creates a form on the page with additional fields for the current user, which he fills in and clicks the Refresh button.
The script reference code is added to the page template:
And the example001.php file with the contents is placed in the root of the folder :
Among other things, the interest may lie in one more thing: if you believe the statistics of Yandex (and Google), and you can believe it, then at the request of “scripts”, they are primarily looking for “scripts for yukoz”.
Until today, JS scripts have been searched in this way for all kinds of chips on their sites, sometimes, however, quite serious and necessary features. Now, obviously, php scripts sharpened by Yukoz will also begin to search, and this may already be much more serious solutions. Which obviously can not only be distributed, but also sold. I hope that a certain market will eventually form.
I hope the audience at the hub will find the information interesting, and I count on criticism and suggestions on this subject.
And yet, for the sake of bragging, I note that for SaaS products we are pioneers in this type of solution, it’s interesting to see for yourself what comes of it. But it seems to us that it should turn out interesting and useful.
For those who are interested in those. details “on the spot”:
How does it look in practice?
Consider an example script that stores any additional information about the user. The script creates a form on the page with additional fields for the current user, which he fills in and clicks the Refresh button.
The script reference code is added to the page template:
Данный пример демонстрирует использование скрипта для хранения дополнительных полей текущего пользователя
Вы не зарегистрированы. Пожалуйста, зарегистрируйтесь или войдите своей учетной записью
And the example001.php file with the contents is placed in the root of the folder :
0)
{
$___notjson=1;
$lines = file('additiondata.dat');
if ($_POST['f0'] && $_POST['f1'] && $_POST['f2'] && $_POST['f3'] && $_POST['f4'])
{
foreach ($lines as $line_num => $line) {
trim($line);
list ($id, $data) = split("\t",$line,2);
if ($id==$_POST['userid'])
{
unset($lines[$line_num]);
file_put_contents('additiondata.dat', $lines);
break;
}
}
You can read more about the intricacies of the functions in the instructions . API usage description