English

creating my first PHP extension

Step by step what I did to compile it

libgnokii example: gnobatmon - read battery level

Edit: this program contains a bug; the up to date version can be found here.

This program reads battery level every five minutes and executes a script whenever it changes.

libgnokii.so.3 example: dialvoice.c 0.3

This small program dials a voice call using libgnokii version 3. Note that at this moment it has been tested only with a Nokia 3210, 3310 and 3330 (nk6100 driver).

Edit: tested with Nokia 8310 (nk6510 driver from gnokii 0.6.12) dials, but does not hang up.

Changes since version 0.2

  • print error message if initialization fails

Writing a PHP extension

Right now I'm reading an interesting tutorial about writing a PHP extension in C by Sara Golemon on zend.com

libgnokii.so.3 example: dialvoice.c 0.2

This small program dials a voice call using libgnokii version 3. Note that at this moment it has been tested only with a Nokia 3330.

Edit 2006-07-16:
Tested with Nokia 3210, will work with driver nk6100.c version 1.187 or later (gnokii later than 0.6.13) but will not detect if call is terminated from outside the program.

Edit2 2006-07-16:
Tested with Nokia 3310, will work with driver nk6100.c version 1.189 or later (gnokii later than 0.6.13) but will not detect if call is terminated from outside the program.

Changes since version 0.1

  • exit loop if the call is terminated from outside this program
Syndicate content