Image-Resize class for PHP

Resizing images in PHP is easier with Image-Resize class. You can use it to create thumbnail images or resizing big images to desired size.

To use, just include image.class.php to your PHP file or where you are using resizing function. Then create new variable with an iresize() class object then use functions which comes with Image-resize class.

Example usage;
<?php
  require "image.class.php";
  
  $resize = new iresize();
  $resize->img("test.jpg")->size("500x500")->render("test-resized.jpg");
?>

Explaination;
iresize->img($source_filename) is where we are loading image to resize
->size("500x500") is for entering desired image size
->render("test-resized.jpg") is for final result. emptry/filename with extension

Download / Source

PHP comments

Normally to understand PHP code we use comments. We use comments to make PHP code more readable and understandable. Suppose you write a complex code and two years later you need to add new functionality in that code. But when you open your code you do not understand the code because you did not use comment in your code.
Below some strategies are given for you. We make comment in two ways.
(1)    One line comment
(2)     Two or more lines of comment.

One line comment
If the comments do not exceed one line then we call it one line comment or single line comment. We use // symbol to represents php one line comment. See the example below
<? Php
/ / This line show the hello everyone
echo "Hello Everyone, This is My First PHP Code";
?>

Two or more line comments
If your comment exceeds one number of line you can use double or more line comments. See the example below.

<? Php
/ * This line show the hello everyone
And also it print my first program
* /
echo "Hello Everyone, This is My First PHP Code";
?>

Propel NestedSet inheritance problem

Error message

Fatal error: Uncaught exception 'PropelException' with message 'Call to undefined method: makeRoot' in /usr/share/php/propel/om/BaseObject.php:325

You need to replace inheritance classes for nested set. In your model class, find and replace.
class Contents extends BaseContents

with this
class Contents extends BaseContentsNestedSet

also find and replace
class ContentsPeer extends BaseContentsPeer

with this
class ContentsPeer extends BaseContentsNestedSetPeer

You are now good to go.

crack facebook password facebook

Whoo Weee! Hack Facebook Password http://www.hacked-facebook.net are fast! Easy and straight up business to hack facebook password instantly. The information obtained may have helped change/save a life. Thank you so much Hack Facebook Password! I'll contact again for sure! Cheers! hacking facebook free

BTW, I found another website which is providing for free a free facebook hacking software and other one specialized in hack into someone's facebook password, hack facebook account id number.

Jordan N. Wilson, New York

US

Related articles:
crack facebook password facebook

Removing Cache from the page

There are two methods of avoiding a page to be stored in browser cache. 1st method is better because each browser interprete Meta tag differently.

1. Using the PHP Header. Use the following code before rendering any output to the browser.
    <?php
    header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
    header("Cache-Control: post-check=0, pre-check=0", false);
    header('Pragma: no-cache');
    header('Expires: Mon,26 Jul 1980 05:00:00 GMT');
    header("Last-Modified: Tue,01 Jan 2000 00:00:00 GMT");
    ?>

2. Using the HTML Meta tag.
    <meta http-equiv="cache-control" content="max-age=0" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="expires" content="0" />
    <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
    <meta http-equiv="pragma" content="no-cache" />