Search This Blog

Friday, September 19, 2008

Writing user-defined functions in PHP

Writing user-defined functions in PHP

Anatomy of a function
Writing your own functions is as simple as using the function command like this:

function somefunction() { [php code] }


The command function is followed by the unique name of your function (in this case somefunction). Next comes the parentheses, which may contain variable names, and the actual function code itself, enclosed in curly braces.

Here's a basic example:

function helloworld() { print("Hello world!
\n"); }



This function simply prints the text "Hello world!" to the Web page. It can be called just like a regular PHP function:



include("functions.inc.php");
helloworld();
?>

Monday, September 15, 2008

Using Images with the TreeView Control

Using Images with the TreeView Control

A List Apart: Articles: Dynamic Text Replacement

A List Apart: Articles: Dynamic Text ReplacementFantastic site with hell lotta tips and tricks on php / css / html /shtml and almost ANYTHING...

ASP.NET QuickStart Tutorials

ASP.NET QuickStart Tutorials

The ASP.NET TreeView control is a powerful server-control for rendering TreeView UI, as shown in the figure below. It supports a variety of programming models, from statically-defined trees, to dynamically constructed trees, to databound trees. The TreeView's rendering is fully customizable, allowing for a wide-range of look-and-feels for the control. The TreeView supports both postback-style events and simple hyperlink navigation, as well as a unique event handling model that allows data to be retrieved directly from a client without requiring a server postback. It also supports rendering on a variety of browsers, and can take advantage of up-level capabilities, such as client-script on later desktop browser versions.

Sunday, September 14, 2008

Web Developments: Templates

Web Developments: TemplatesBest few templates with 500 flash banners

Friday, September 12, 2008

ImageMagick: Convert, Edit, and Compose Images

ImageMagick: Convert, Edit, and Compose Images
ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

Thursday, September 11, 2008

Cropping and resizing a GIF with PHP’s imagick extension « Christer’s blog o’ fun

Cropping and resizing a GIF with PHP’s imagick extension « Christer’s blog o’ fun

Fantastic ImageStik for cropping images

PHP & jQuery image upload and crop | WebMotionUK

PHP & jQuery image upload and crop | WebMotionUK

allow user to crop uploaded image PHP this is with example in PHP5

Image crop - DHTML user interface

Image crop - DHTML user interface

allow user to crop uploaded image in AJAX with download .zip

Configuration - eye48 Wiki

Configuration - eye48 Wiki
To work properly Instant Picture need to know where your filters and cache files are located. Please edit following lines:

If the directories cache and filters are in the same folder where instantpicture.php is located you don't need to edit this. It will work! Otherwise Instant Picture Creator needs to know that places relative to his own location. Example:

PHP File Upload Security

PHP File Upload Security

  • Disable Script Execution an Hide Indexes with .htaccess
  • Using PHP Functions to Check Uploaded File
  • How to Read & Display the Photo Files?

» Implementing Secure File Upload in PHP using .htaccess

» Implementing Secure File Upload in PHP » Corpocrat Blog

Disable Script Execution with .htaccess

Just create .htaccess file with contents below and place it on the uploads folder to disable running malicious scripts.

AddHandler cgi-script .php .php3 .php4 .phtml .pl .py .jsp .asp .htm .shtml .sh .cgi
Options -ExecCGI


Disabling executing of these files could give us an extra layer of protection.

Further if you are allowing your users only photos or picturer, you can restrict other files by placing the following code your your .htaccess file.

Monday, September 8, 2008

WebMail Client , WebMail Server , Email Server for Linux, Unix and Windows - @Mail Support

WebMail Client , WebMail Server , Email Server for Linux, Unix and Windows - @Mail Support


Customizing the login and sign-up screens in @Mail is a simple and effective way of branding @Mail and incorporating it into your web-site theme. It can be done on a per-domain basis allowing you to provide a unique Webmail service for several domains, while still only having one copy of @Mail installed on your server.

content-wide advt