![Yealink SIP VP-T49G Developer'S Manual Download Page 92](http://html2.mh-extra.com/html/yealink/sip-vp-t49g/sip-vp-t49g_developers-manual_3250215092.webp)
XML Browser Developer’s Guide for Yealink IP Phones
82
flush();
fclose($fp);
}
}
##############################
# The above codes are fixed, please just edit the following codes according to requirement.
$xml = "
the beginning of the root element in the XML object
\n";
$xml . = "
the child elements in the XML object
\n";
$xml . = "
the end of the root element in the XML object
\n ";
<!--Additional XML Items may be added -->
<!--All XML Items added here construct an XML object -->
push2phone("
Server IP Address
,
Phone IP Address
",$xml);
# replace IP address of the push XML server with ”Server IP Address”
# replace IP address of the phone with “Phone IP Address”
?>
Sample php source code:
In this example, the IP address of the push XML server is 192.168.0.112, and the server
is defined to send a XML message to the IP phone with IP address 192.168.0.150.
<?php
#
function push2phone($server,$phone,$data)
{
$xml = "xml=".$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: text/xml\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();
Summary of Contents for SIP VP-T49G
Page 1: ...i i...
Page 2: ......
Page 10: ......
Page 94: ...XML Browser Developer s Guide for Yealink IP Phones 84...
Page 96: ...XML Browser Developer s Guide for Yealink IP Phones 86...
Page 98: ...XML Browser Developer s Guide for Yealink IP Phones 88...
Page 99: ...Configure the Push XML Server 89...
Page 116: ...XML Browser Developer s Guide for Yealink IP Phones 106...