Mohammad Towhidul Islam

    03-Oct-13 11:50:52 am

    Php performance optimization on basic syntax and core here are some performance

    PHP Performance Optimization on Basic Syntax and Core Here are some performance/optimization tips, tricks and best practices to keep in mind when developing in PHP. The list will be updated on a regular basis, so check back for updates Basic Syntax & Core • Use single quotes instead o...

    Read More


    Mohammad Towhidul Islam

    02-Oct-13 05:44:42 pm

    Expose php credits adding phpb8b5f2a0 3c92 11d3 a3a9 4c7b08c10000 at the

    Expose PHP credits Adding ?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000 at the end of the URL of PHP scripts will expose the PHP credits....

    Read More


    Mohammad Towhidul Islam

    02-Oct-13 05:38:27 pm

    Get the apache version which are we using heres a quick way

    Get the Apache version Which Apache version are we using? Here's a quick way to find out: <?= apache_get_version(); ?> It will print something like this: Apache/1.3.31 (Debian GNU/Linux) mod_throttle/3.1.2 PHP/4.3.9-1...

    Read More


    Mohammad Towhidul Islam

    02-Oct-13 05:29:54 pm

    Create an image on the fly with php gd library we already know

    Create an image on the fly with the PHP GD library We already know how to return an already made image; here's how to create an image on the fly: <?php header ("Content-type: image/png"); $im = @imagecreate (150, 50) or die ("Couldn't create image!"); $bac...

    Read More


    Mohammad Towhidul Islam

    02-Oct-13 05:28:31 pm

    Error reporting with php depending on whether youre programming debbuging or installing

    Error reporting with PHP Depending on whether you're programming/debbuging or installing a script on a production server, you may want error reporting more or less verbose. Here's how to change it: <? // Disable all error reporting error_reporting(0); // Default configuration ...

    Read More


    Mohammad Towhidul Islam

    02-Oct-13 05:12:35 pm

    Display currencies with php sometimes we must display a number as money

    Display currencies with PHP Sometimes we must display a number as a money amount, but we can know what's the correct way to display each possible currency. Nevermind, PHP will do that for you: <?php $number = 1234.56; // USA (USD 1,234.56) setlocale(LC_MONETARY, 'en_US'...

    Read More


    Md Fahad

    01-Oct-13 04:41:52 pm

    How to make pagination with php if isset getpg pg int

    How to make pagination with php? if(isset($_GET['pg'])){ $pg=(int)$_GET['pg']; }else{ $pg=1; } // i want to show 16 row on a page, so the limit is also 16 $start_from=($pg-1)*16; $im...

    Read More


    Mohammad Towhidul Islam

    01-Oct-13 01:35:33 am

    Detecting visitors real ip address mobile web browser opera mini is well

    Detecting Visitors Real IP Address Mobile web browser opera mini is well known for a similar IP address for different users. Detecting the real ip address of an operamini user becomes hard while using the $_SERVER["REMOTE_ADDR"] php command. But we can detect the real ip using a ...

    Read More


    Mohammad Towhidul Islam

    01-Oct-13 01:24:33 am

    Check if website is available with php performs a curl request to check

    Check if website is available with PHP Performs a cURL-Request to check, if a website exists / is online Technique #1 <?php if (isDomainAvailible('/')) { echo "Up and running!"; } else { ...

    Read More


    Mohammad Towhidul Islam

    01-Oct-13 01:17:27 am

    Cleaning variables that are submitted via web forms variables always need to

    Cleaning variables that are submitted via web forms Variables that are submitted via web forms always need to be cleaned/sanitized before use in any way, to prevent against all kinds of different malicious intent. function clean($value) { // If magic quotes not turned on add ...

    Read More


Copyright © 2025. Powered by Intellect Software Ltd