Shared Variables

Sample Code

Updating a variable

function send_update( $host, $port, $name, $value ) {

using PHP

$s=fsockopen( $host, $port );

 

fwrite( $s, “UPDATE \”$name\" \"$value\"\r\n" );

 

fclose( $s );

 

}

 

Note: this simplified example does not handle the escaping of control characters.

Sending an event

Sending a keydown event for the key 'V' with control modifier pressed.

using PHP

function send_copy_key( $host, $port ) {

 

$s=fsockopen( $host, $port );

 

fwrite( $s, “EVENT \”keydown\” \”Ctrl+V\”\r\n” );

 

fclose( $s );

 

}

Updating a variable

telnet 192.168.1.10 1234

using telnet

Trying 192.168.1.10...

 

Connected to 192.168.1.10

 

Escape character is '^]'.

 

UPDATE “menu” “P1”

 

^]

 

telnet> quit

 

Connection closed.

Updating a variable

http://192.168.1.10:1234/update?menu=P1

using HTTP

 

Enabling the Network API

The network API must be enabled on the IS-SPX Player before it can be utilized. This setting is controlled from the IS- SPX Player Browser-Based Configuration Pages (FIG. 113):

Click the box and then click “Apply”

FIG. 113 Enabling the Network API

For more information on the Browser-Based Configuration Pages, please refer to the

IS-SPX-1000 & IS-SPX-1300 Operation Reference Guide, available at

www.amx.com.

88

Inspired XPress - Programming Guide

Page 96
Image 96
AMX IS-SPX-1000/1300 manual Enabling the Network API, Sample Code