Page 1 of 1
How to get Caller Id info from a modem
Posted: Sat Jun 01, 2002 6:29 am
by ozmodiar
Does any one know how to get Caller Id information from a modem using php?

Specifically the telephone number of the caller. I need this to search a DB table for client information.
Posted: Sat Jun 01, 2002 9:42 am
by enygma
more than likely, you'll just have to find an external script that does that and just run it/grab the output in a PHP script...
PHP is a web scripting language - it was never really made to be heavy on the file system side of things...
Posted: Sat Jun 01, 2002 11:21 am
by ozmodiar
I thought that might be the case.

.
Thanks anyway.
How would you run an external script using php and how would you grab the result in a php script?
Posted: Sun Jun 02, 2002 5:55 pm
by James Pelow
Seeing as we're talking about Modems I'm going to take for example a PPP connection and getting info on that. It's a crude example but you could refine it.
Code: Select all
<?php
// The shell command.
exec("ps auxww | grep "pppd"", $pppd_info);
$array = explode (" ", $pppd_info);
$count = count($array);
for ($i = 0; $count > $i; $i++); {
echo ($arrayї$i] . " ");
}
?>
I'm assuming you're using a unix/linux OS if you're not I wouldn't have a clue how to do it.
Where are you in Dublin? I'm in Killiney myself.
-James Pelow
Posted: Tue Jun 04, 2002 3:09 am
by ozmodiar
Thanks. Thats exactly what I was looking for.
I'm in Blanchardstown.