Is it possible to return information from LUA script to PHP.
I am trying to test if a group exist with the following line
$strLuaScript_Group = "c_GroupExist('".$s_domain."','".$s_group."')";
but I get nothing back.
Returning information from LUA to PHP
-
- Site Admin
- Posts: 2084
- Joined: Tue Sep 29, 2009 6:09 am
Re: Returning information from LUA to PHP
Here is an example for the PHP script:
Code: Select all
<?php
$strUrl = "http://127.0.0.1:5466/admin_webservice.html";
$strUrlParam = "?admin=demo&pass=demo&cmd=";
$s_domain = "domain1";
$s_group = "group111";
$strLuaScript = "local bExist = c_GroupExist('".$s_domain."','".$s_group."') if bExist then print('yes') else print('no') end ";
$strResult = file_get_contents($strUrl.$strUrlParam.rawurlencode($strLuaScript));
print($strResult);
?>
-
- Posts: 40
- Joined: Mon Feb 09, 2015 8:50 pm
Re: Returning information from LUA to PHP
Hello
Thanks, I got the clue
Regards
Sten
Thanks, I got the clue
Regards
Sten