01-28-2016, 04:02 AM
Hi there!
I can successfully push xml to my yealink phones using port 80, but nothing happens when I try to sendit using port 443
I'm using a function much like this one taken from yealink's TextScreen.php, but changing port to 443 causes the phone to ignore it.
Is is possible? Am I missing something?
I can successfully push xml to my yealink phones using port 80, but nothing happens when I try to sendit using port 443
I'm using a function much like this one taken from yealink's TextScreen.php, but changing port to 443 causes the phone to ignore it.
Code:
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();
fclose($fp);
}
}
Is is possible? Am I missing something?