Is there any way I can implement this in PHP

Hi all,

I have a website based on PHP and it has a image upload based functionality, what we have right now is a watermark functionality which randomly watermarks on either of the following zones :

  • Left-top Corner
  • Right-top Corner
  • Right-bottom Corner
  • Left-bottom Corner

The watermark logo is 100×20 pixels in size. What I am planning to do is, search the image (based on RBG values) and find a part of image which has PLAIN part, plain as in I need to find a part of image ,at least 100×20 pixels in size, which doesnt change, so that I can watermark on that part.Any suggestions?

Submitted July 28, 2014 at 12:34PM by iKSv2 http://ift.tt/1tgRP2n

Outlaw – new features released!

Hi! I add two new features to the Outlaw library!

http://ift.tt/1mEKl5c

They are ‘singleton data’ and ‘simple authentication’ mechanism!

I implemented the features because:

Sometimes we need tables that will always have only one row in it. For example, contact information, website settings, and etc. We don’t really need complete CRUD for this since we will never delete it or insert new row. So this enable set data in config file:


$config['singleton_data'] = array( 'site' => array( 'name' => 'Kelly', 'contact' => 'Hi, I am Kelly' ) );

and then use it like


$this->data['site'] = $this->ol->readSingleton('site'); $this->ol->updateSingleton('site')

and,

Sometimes we just want to have a simple and fast way to protect certain pages.

We don’t want to implement password hash procedure, member system and even the views for login and register since there’s even only one admin user will need to login the application!

Anyway, it’s still very dirty and fast. So I need to say again, this library should only be used for insensitive applications or prototyping new ideas.

I would be very appreciated for any opinions.

🙂

Submitted July 27, 2014 at 04:25PM by howtomakeaturn http://ift.tt/1nKNIK0

I love this feeling: "I can’t wait to implement this!"

I’m away from my computer for the weekend but I came up with and wrote down some self-proclaimed-genius solutions to a few tricky sections of something I’m working on. Programming often tends to either make you feel like a genius or an idiot, and I’m very much enjoying the high of not feeling like an idiot for a change. Just wanted to share it somehow.

Submitted July 27, 2014 at 04:26PM by groenengoud http://ift.tt/UD4JJ5