Creating an XML Application
41-001160-03, Rev 00, Release 2.4
F-85
Example 2
:
Below is a sample php source code which sends an XML object to an Aastra
phone.
<?php
#
function push2phone($server,$phone,$data)
{
# url-encode the xml object
$xml = "xml=".urlencode($data);
$post = "POST / HTTP/1.1\r\n";
$post .= "Host: $phone\r\n";
$post .= "Referer: $server\r\n";
$post .= "Connection: Keep-Alive\r\n";
$post .= "Content-Type: application/x-www-form-urlencoded\r\n";
$post .= "Content-Length: ".strlen($xml)."\r\n\r\n";
$fp = @fsockopen ( $phone, 80, $errno, $errstr, 5);
if($fp)
{
@fputs($fp, $post.$xml);
flush();
fclose($fp);
}
}
##############################
$xml = "<AastraIPPhoneTextScreen>\n";
$xml .= "<Title>Push test</Title>\n";
$xml .= "<Text>This is a test for pushing a screen to a phone </
Text>\n";
$xml .= "</AastraIPPhoneTextScreen>\n";
push2phone("172.16.96.63',"172.16.96.75",$xml);
?>
Draft 1
Содержание 675i Series
Страница 4: ...D r a f t 1 ...
Страница 26: ...Non Blocking HTTP Connections F 90 XML SIP Notify F 91 Limited Warranty D r a f t 1 ...
Страница 30: ...D r a f t 1 ...
Страница 70: ...D r a f t 1 ...
Страница 90: ...D r a f t 1 ...
Страница 298: ...Configuration Server Protocol 4 116 41 001160 03 Rev 00 Releaes 2 4 IP Phone Administrator Guide D r a f t 1 ...
Страница 670: ...Operational Features 5 372 41 001160 03 Rev 00 Releaes 2 4 IP Phone Administrator Guide D r a f t 1 ...
Страница 730: ...Encrypted Files on the IP Phone 7 8 41 001160 03 Rev 00 Releaes 2 4 IP Phone Administrator Guide D r a f t 1 ...
Страница 742: ...Upgrading the Firmware 8 12 41 001160 03 Rev 00 Releaes 2 4 IP Phone Administrator Guide D r a f t 1 ...
Страница 743: ...Upgrading the Firmware 41 001160 03 Rev 00 Releaes 2 4 8 13 Upgrading the Firmware D r a f t 1 ...
Страница 744: ...Upgrading the Firmware 8 14 41 001160 03 Rev 00 Releaes 2 4 IP Phone Administrator Guide D r a f t 1 ...
Страница 745: ...D r a f t 1 ...
Страница 746: ...Upgrading the Firmware 8 16 41 001160 03 Rev 00 Releaes 2 4 IP Phone Administrator Guide D r a f t 1 ...
Страница 1022: ...Troubleshooting Parameters A 248 41 001160 03 Rev 00 Release 2 4 IP Phone Administrator Guide D r a f t 1 ...
Страница 1026: ...D r a f t 1 ...
Страница 1060: ...Sample Configuration Files C 34 41 001160 03 Rev 00 Release 2 4 IP Phone Administrator Guide D r a f t 1 ...
Страница 1062: ...Sample Configuration Files C 36 41 001160 03 Rev 00 Release 2 4 IP Phone Administrator Guide D r a f t 1 ...
Страница 1068: ...D r a f t 1 ...
Страница 1072: ...D r a f t 1 ...
Страница 1076: ...D r a f t 1 ...
Страница 1182: ...Index 12 41 001160 00 Release 2 2 Rev 05 Index D r a f t 1 ...
Страница 1183: ...D r a f t 1 ...