Run sql dump in your Mysql server, then Put the codes in your server. This webservice always gives JSON output.
This project is created for who wants to learn basic PHP webservice. So it is for PHP beginners.
We have just one table whose name is "users". Here is its sql:
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`unique_id` varchar(64) CHARACTER SET utf8 NOT NULL,
`name` varchar(50) CHARACTER SET utf8 NOT NULL,
`email` varchar(100) CHARACTER SET utf8 NOT NULL,
`encrypted_password` varchar(64) CHARACTER SET utf8 NOT NULL,
`salt` varchar(16) CHARACTER SET utf8 NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
You can add/login a user with using GET or POST. There is more explanation in README.txt file.
Categories
Software DevelopmentLicense
Creative Commons Attribution LicenseFollow PHP Login Webservice with JSON
User Reviews
-
Hello, Thanks for such a good post about webservice in POST and GET, but please add how to login and register using POST method as well, and also let me know the code for how to add image as well in database n code for it...