This is a first try at writing a PHP extension to use gnokii.
Some ideas:
- decide which functions to include (no need to duplicate commandline gnokii)
- [yes] add a "gnokii_" prefix to all functions?
- [done] --identify
- --getsms
- --sendsms / --savesms
- --getphonebook (useful for backups)
- --getsecuritycodestatus / --entersecuritycode
- see if using something like mysql persistent connections makes sense
- how to handle --config and --phone options when they will be implemented?
See attached archive. Edit: this is now in gnokii-extras' git repository.
At the moment here is only the "identify" function, returning an associative array:
$ php -r 'dl("gnokii.so"); print_r( gnokii_identify() );' Array ( [IMEI] => xxxxxxxxxxxxxxx [Manufacturer] => Nokia [Model] => 3210 [Product name] => NSE-8 [Revision] => SW 06.00, HW 5591 )