CrankBerry Blog Title

PHP Postings

2010


No Comments

Awesome image cropper/thumbnail maker script – Modified Marquee Tool

Categories :: Javascript, PHP

As I'm recoding my portfolio right now, I thought to myself – how great would it be to have a thumbnail maker tool. Some PHP or Javascript solution to crop images dynamically without the use of Photoshop. I would hate to fire up Photoshop every time I want to upload something. I'm sure you've all been there before. Anyways I landed upon a script that suited my need exactly. The Rectangle Marquee Tool. The tool looks great but was a bit confusing for me to get working and based on the comment for a few others too. Now I've also done some slight PHP modification to get the script working to my needs and generating the correct thumbnails.

See what I'm mumbling on about right here:
Demonstration of Marquee Tool

2010


No Comments

PHP password strength detector script

Categories :: PHP

If you operate a user registration script on your website you may want to ensure users are protected. There are certain aspects of this you cannot control such as the user's self selected password. Here I have a script that will detect the user's password strength and base on that you could reject the password or just make notice to the user their password's strength.

PHP Password Strength Detector Script

2009


(29) Comments

Secure PHP login without database

Categories :: PHP, Web Security

Although not recommended but maybe for some reason you need to create a PHP login without the use of any database (SQL). For some reason you maybe scared to approach, but here I made a script that is fairly secure without utilizing any database at all. It allows users to login and stay logged in. If you are one of those people then here's the script for you.

2009


No Comments

In page popup with faded background – in PHP

Categories :: CSS, HTML, PHP

Sometimes you may be required to have popup windows on your website. They're obtrusive and hard to style with your site, in summary – nasty. What I've seen is other websites fade out their background and have an in page popup. I came up with a script that does the same thing in PHP and it looks exactly like the image below. Jump to the next page for the script.

2009


No Comments

PHP Simple Email Validation

Categories :: PHP, Scripts and Programming

When having having forms on your website one of the most common form fields is usually the user's email. To ensure you're receiving quality information and not receiving bogus spams you should validate the email to be of a real one or close enough to. Here's a quick free email validation script for those PHP lovers.

2009


No Comments

PHP Image Verification aka Captcha (Basic)

Categories :: PHP, Scripts and Programming

You're making your website and you have forms. Here you are thinking, what if spam bots found my form? What if somebody submitted to my form from their own script? What should I do? Well, there's many things you can do to mitigate your worries but one of the simpler things you could do is having an image verification field in your form. Here's a basic script to generate a random code in image that bots can't read.

image verification

2009


(2) Comments

Setting PHP cron job with crontab

Categories :: PHP, Web Hosting

So you've created a PHP script that does something like clean your tables or compiles a report on some data. You want it to run it every 2 hours but you don't want to go to your computer every 2 hours. What should you do? Cron job using crontab is what you should do. Cron job is basically setting a timer on your server to run the script at a certain time that you please. Sounds easy enough, but how do you do it? Lets find out!

2009


(1) Comment

Random code and password generator in PHP

Categories :: PHP

Sometimes when you're interacting with users you need to generate a random string of code or password. For example, a user is signing up for a service and you decided to give them some random password to start with, that's what I'm talking about. Here I have a quick script which allows you to generate random code with a defined length.

2009


(3) Comments

Simple dynamic PHP sliding pagination

Categories :: PHP

The other day I was working on a website drawing out a content well over 400 rows of data. Displaying the data all on one page is a lot of stress for the user so I made a quick pagination script. By displaying 20 results per page would end up with 20 separate pages. Imaging laying out 1 to 20 across your website (ugly eh?) well it gets worst. Imagine this database doubles! Yes! We're now laying 1 to 40 across our website. So I made this simple dynamic slider in which it only displays a certain amount of pages to choose from and as you travel further it will list more pages.

You are currently browsing the archives for the PHP category.

Categories


Archives

Recent Blogs