Showing posts from December, 2013

MongoDB: Getting Started With CRUD Operations

MongoDB is No-Sql Open Source database system which uses document as record of database. MongoDB is designed for high performance and high accessibility.   Document is set of field => value pair combination and store this information in form of BSON ( BSON is binary representation of JSON records) which is native data type in most of languages. MongoDB store set of documents in the form of collection. Now let’s see the basic operations which can be handled in MongoDB.           Create           Read           Update          Delete Collectively called CRUD operation Create Operation MongoDB perform atomic create operation on single document. It adds new document to selected collection.  db.{collection_name}.insert({                  field => value,                  field => value,                  field => value, }); Here value could be simple datatype or complex (document or array) Create operation always add unique iden

How To Watermark A Photo Using PHP

Hello Friends, This blog post will help you to create a watermark image using PHP. But first let’s get introduce yourself with watermarking. What is Watermark? Watermark is a marker which is embedded inside image (other media). It is use to identify the ownership. Why we need Watermarking? Watermarking helps to maintain integrity   and avoid unauthorized use for images (other media source also). For example let’s suppose you are have image hosting website and you provide unique and beautiful images to user. If you want only authorize user should download your images then you need to provide image preview with watermarking and original image to authorized user only so that unauthorized user cannot misuse it. Now let look at some coding stuff. First example shows watermarking images with text, normally we use copyright text. And second example show watermarking with watermark image. Watermarking using text // set water mark text $watermark = 'wate