PHP Caller ID
#1
Hey Guys,

Just been playing around with XBMC, we have around 6 machines running it in our house, as we have quite a few bedrooms, I was looking for an easy way to announce to all machines the caller ID of the incoming call. Since we run an internal webserver and I vaguely know php I thought it would be interesting to try and code something.

Below is my attempt

Usage : Save the file onto your webserver and you can pass CallerID's to it like this - scriptname.php?number=08008899922

Code :

Code:
<?php

$number = isset($_GET['number']) ? htmlentities($_GET['number']) : false;

$numberhtml = urlencode($number);

echo $numberhtml;

fopen ('http://YOUR XBOX IP:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn%28Notification%28Incoming%20Phone%20Call,'.$numberhtml.'%29%29','r')or die("UltimateFail");
?>

For those wondering why I have an urlencode function, my callerID software spits out a Text String in the form "NAME - Number" and if its not in the address book then just "Number".
Reply

Logout Mark Read Team Forum Stats Members Help
PHP Caller ID0