Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing PHP variables to Livecode

Problem:

I have a number of variables stored in $_SESSION in PHP and I am wondering if it is possible at all to transfer these to Livecode scripts (.lc)?

Current solution:

I use $_GET to move information but I would like to know a way where you can connect PHP with Livecode and transfer information easier.

Any ideas?

like image 764
kexxcream Avatar asked Nov 20 '25 15:11

kexxcream


1 Answers

Have you looked at CallPHP library by David Beck? I came across this library sometimes ago and it helped me.

Here is a description of the library culled from the website:

"CallPHP enables a LiveCode script to easily call PHP functions on a remote server and have values returned to it from the PHP functions. CallPHP is very easy to use. Here is an example of how CallPHP can be used from a LiveCode script to call a PHP function on a remote server that adds two numbers together:

put callPHP_Call( "AddNumbers", 3, 4 ) into callPHPRes
put callPHP_GetResult( callPHPRes ) into theResult
-- theResult now contains 7

http://www.rotundasoftware.com/livecode/

The session variables can be called from (a) function(s) as described above after installing the library.

like image 192
dtechplus Avatar answered Nov 22 '25 03:11

dtechplus