Skip to main content

Posts

MongoDB with PHP – Configuration and Examples

So, in previous posts, we have seen What is MongoDB and how we can perform CRUD operation on MongoDB .  So, moving ahead, lets learn how to use MongoDB with PHP.  By default, PHP assumes you will be using MySQL, so till now it doesn’t support MongoDB. But we can add the Mongo DB support to our existing PHP. On Windows https://s3.amazonaws.com/drivers.mongodb.org/php/index.html Go to the link, download the suitable version of zip. This zip contains the dll for mongo you will be using. Just unzip the zip file, and select the appropriate version of the dll(for ex, if you are using php 5.3.13 and you have downloaded the php_mongo-1.4.5.zip   , on 32-bit systems, you needs to use the php_mongo-1.4.5-5.3-vc9.dll from the zip.   So select the appropriate version as per 32/ 64 bit and your PHP version. Then just rename the dll file to php_mongo.dll and paste it to your php extensions directory.( ext by default). Then open your php.ini file, a...

CRUD Operations on MongoDB ( Insertion, Udpation, Deletion and Retrieval)

Mongo DB , as I have explained in one of my previous post( What is MonGODB ), is a Non- Relational Document Oriented Database. Consider, an Relational database like MYSQL, when we want to perform operations on MySQL DB, we have a query language named SQL. But in MongoDB, we don’t have another query language to perform these operations. For every operation, there exists a programming language API, that is used to perform the operations. So, Basically there are four operations that can be performed on a database known as(CRUD operations)     a)       Insertion     b)       Getting data from database     c)        Updating data in database     d)       Removing data Before moving forward lets just get familiar with few terms:     a)       Document : its like a...

Login with Facebook Account PHP Code

Hello All. In the previous post, we have explained the Login with Google.. This post have Complete Code for Login / Sign In with Facebook Account for PHP Code As you all know, FB is as popular as Google, so Login With Facebook is also a very important par of a website, Below is the detailed explanation for complete procedure starting from creating  a  Facebook app to getting the complete details of user logged in . Download Source Code Live Demo Starting is with create an APP for your site . Note : You should log in to your Facebook account before moving ahead. Go To https://developers.facebook.com/ Create an APP using the menu  APP appearing on developers toolbar on this page     The Following popup appears  Fill in the details and CREATE APP After this the APP dashboard appears . The dashboard has the App Id Though the app id is the only required field for login , in backend the process the URLs ie the doma...