API Documentation (Beta)

notify

Description

string notify ( string $url )

notify allows real-time interaction between VoicePHP application and (your) website specified by url.

Parameters

url

This specifies the URL to be invoked. It can contain query string. For e.g. http://foo.com/invoke.php?name1=value1&name2=value2 ..

Return Values

Response text returned by the URL. The maximum length of the return value can be 127 characters.

Example

A user is prompted to enter a phone number. The website has the business logic to query the PIN number based on the phone number. VoicePHP application invokes the website URL to pass the entered phone number. Website back-end queries the PIN number from the database and returns it back in the response/return string. VoicePHP application can then use the PIN number and proceed further
...

$phone = prompt("Please enter your phone number);
$good_pin = notify("http://foo.com/invoke.php?phone=$phone);
$pin = prompt("Please enter your PIN number);
if ($good_pin == $pin)

...