How do i pass Tasker variables to PFA ?

17 views
Skip to first unread message

KouiK

unread,
Aug 7, 2011, 11:06:15 PM8/7/11
to php-for...@googlegroups.com
Hi all.

I've just discovered PFA and i'm using Tasker ( http://tasker.dinglisch.net ) to run my scripts
I've some great knowledges on php, and i'm really exciting to know that i can use the android scripting library with PHP.

But i have some issues trying to get a Tasker variable into my php Script.

I created a task in tasker :
+ Set variable : %NICK to 'Tom'
+ Run script : test.php, pass variable : %NICK

Here is the php script i tried :
<?php
require_once("Android.php");
$droid = new Android();
$name = $droid->dialogGetInput("Hello" . $GET['NICK'] ." !" , "What is your lastname ?");
$droid->makeToast('Hello, ' . $GET['NICK'] . ' ' . $name['result']);
?>

of course, the script works, but $GET['NICK'] is empty. Nothing is print.

I also tried :
$_NICK
$GET['nick']
$POST['NICK']
$POST['nick']
$nick

but nothing seems to work.

Any idea ?

Simon Horton

unread,
Aug 10, 2011, 4:43:34 AM8/10/11
to PhpForAndroid
Try doing:

var_dump($_REQUEST);

and then

var_dump($argv);

See if they give you anything hopefully the arguments have been copied
to request or argv.

/Simon

On Aug 8, 5:06 am, KouiK <thomaslart...@gmail.com> wrote:
> Hi all.
>
> I've just discovered PFA and i'm using Tasker (http://tasker.dinglisch.net
Reply all
Reply to author
Forward
0 new messages