Category Archives: PHP

PHP Graph

http://stackoverflow.com/questions/4352614/how-to-generate-graphs-and-charts-from-mysql-database-in-php

http://www.d3noob.org/2013/02/using-mysql-database-as-source-of-data.htm

Generating Charts from MySQL Database Using PHP

http://www.codediesel.com/visualization/display-line-and-area-charts-in-php-and-mysql/l

Cookie Testing

 

Simple PHP CRUD Tutorial

Download Whole Scripts

Create Operation
insert.php

insert.php

insert.php

Read Operation
display.php

 

display
UPDATE operation

edit.php

edit

Delete Operation

delete.php

One row deleted

One row deleted

PHP OOP basics

Reference:

Object Oriented PHP for Beginners: Page 4

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 🙂

 

PHP-GCM to specified destination number

 

Reference: https://gist.github.com/prime31/5675017#file-gistfile1-php-L16

 

code:

To call this from browser you have to call like this

https://zakilive.com/gcm/gcmtest.php?id=registered_key_from_the_app

another example: http://stackoverflow.com/questions/11242743/gcm-with-php-google-cloud-messaging

PHP MySQL based simple image uploading system

I tried to built this system from youtube videos and by searching net.

I am sharing the code and what I have learnt today 🙂

We will use two php file in an one directory

Then go to your phpmyadmin and create a table then create a database and create a table name ‘store’ or paste this sql query on the SQL box on your phpmyadmin

then create one file with your PHP IDE or different text editor and paste this code name of the file will be:index.php

Read out the whole code line by line and you will be definitely understand what I have written.

and second just create a get.php file and paste the code

Don’t forget to give your database name ,table name and password for your database username and then if you can connect successfully

Voila ! you are done ! 🙂

You can checkout this whole project in my github  I made it public and opensource you can also fork it and contribute.

Github : http://github.com/zakilive/phpimageupload

Please keep a comment if it’s helped you  or you have found any bug.Thanks for reading 🙂