Jump to content

Variable from php


Ciao121

Recommended Posts

Maybe this is stupid. I searched nut didn't find how to do it.

 

I want to make a php plugin, so I tried a very very simple script:

 

<?php
echo "numero=100";
?>

 

Script is succesfully executed, but no var is returned to the script... what am I missing?

 

Thank you

Link to comment
Share on other sites

I would have thought that should work. The only thing is on the IVM SDK page they use 'print' instead of echo, but I didn't think there was much of a difference between the two commands.

Let me know if you're still having trouble.

Link to comment
Share on other sites

I tried echo, print $var="something".... everything :)

I think I'm missing something in the IVR part, but I can't reaaly find a complete howto :(

 

I saw there is a ineturl plugin on this site (that works like a bridge from ivr and a php on a remote server); I can try using it but the php is local on the same machine where ivr is installed (and I don't like the idea to installa a web server only for this)

Link to comment
Share on other sites

I solved,

informations here http://nch.com.au/ivm/sdk.html#AAD are wrong:

 

Argument 1: -q (prevents HTTP headers being sent)

Argument 2:

Arguments 3+: Arguments to pass to PHP script

 

should be

 

Argument 1: -q (prevents HTTP headers being sent)

Argument 2: script path

Arguments 3+: Arguments to pass to PHP script

 

BTW the script on the same page has syntax errors :)

 

This is what I use for a test

 

<?php
if ($argv[1] == 1234)
{
echo "NextOGM=1";

}
else
{
echo "NextOGM=2";
}
?>

Link to comment
Share on other sites

Good to hear you got it sorted out. I actually made a few plug-ins in php for IVM a long time ago, but it's been a while and I couldn't remember how I manged to do it last time.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...