php-gcm project for sending sms to any number through google cloud messaging

phpgcm

This is an opensource project by me and final release is version 1.0.1 till now.
Description:
First we have to create index.php for the options that will give the senders number and text box what to send to the sender and then at last the resgistration id from your mobile phone(It will be needed to use your mobile phone as messaging server.It will come from GCM app).

index.php

Now we have to create gcmtest.php it is the core part of our project.Here all the settings available that you can customize easily according to your needs.

gcmtest.php

Now when we run the script from our php backend server then it will show you the page where you will input sender number and message and click submit it will pass through your phone to google cloud messaging server and receiver will recieve a sms from your number.

You can download this whole project from my mirror server: php-gcm.zip

For testing this app you can go to:
http://pest-zakilive.rhcloud.com/phpgcm/
github address for source code: https://github.com/zakilive/phpgcm

References:
I took help from the opensource project to learn how they did the gcm passing:
https://gist.github.com/prime31/5675017#file-gistfile1-php-L16 (In PHP)
https://github.com/anjlab/android-sms-gateway (Android SMS gateway call in Ruby)

If you liked the tutorial or face any problem don’t forget to comment in the comment section.Thanx for reading 🙂

 

  • CARLOS ANDRES ACOSTA

    Thanks, do you know how generate the API_ACCESS_KEY automatically in php?