• Login
  • Become a blogger
  • PHP


    10 PHP Tips for noobs

    Posted on Monday, February 18th, 2008 by thinkdj

    Jeffery Vaska has “10 Tips That Every PHP Newbie Should Know“, a nice collection of tips for a newbie venturing into PHP. Tips like MySQL Connection Class, Dealing with Magic Quotes etc can be found there.

    PHP function for Javascript redirect

    Posted on Saturday, January 26th, 2008 by thinkdj

    The following code is basically JS, but has been made into a PHP function so that it could be invoked with different parameters as per our needs.
    <?php
    function js_redirect($url, $seconds=5) {
    echo “<script language=\”JavaScript\”>\n”;
    echo “<!– hide code from displaying on browsers with JS turned off\n\n”;
    echo “function redirect() {\n”;
    echo “window.location = \”" . $url . “\”;\n”;
    echo “}\n\n”;
    echo “timer [...]

    Spellify : automatic input field spell check

    Posted on Saturday, January 26th, 2008 by thinkdj

    Spellify automatically checks for spelling errors on user entered text in input text fields. Spellify is powered by the Google™ spell checker. You can see a demo at te homepage and also download the latest version there. Spellify not only works for text fields, but also on text areas.

    Great looking charts in seconds with Open Flash Chart

    Posted on Saturday, January 26th, 2008 by thinkdj

    Open Flash Chart lets you make great chart/pie representations from you data for a great looking output. The data file is either a text file, or a .php, Perl, Python, Java (or another flavour of dynamic) page.

    Open Flash Chart, is open source. It is free to use and you get the source code to fiddle [...]

    PHP Performance Benchmark Script

    Posted on Friday, December 28th, 2007 by thinkdj

    /*

    PHP Performance Benchmark Script

    Copyright 2003 : PHP Consulting

    There are two settings:

    First, set $file to be the server and page that you want to benchmark.

    Secondly, set $iter to be the number of times you want it loaded.

    */

    error_reporting(E_ALL ^ E_NOTICE); //For disabling non fatal error outputs

    $file = “http://127.0.0.1/Joomla/index.php”; //Location to file

    $iter = 5; //No of times to [...]

    Remove invalid characters from a filename

    Posted on Thursday, December 27th, 2007 by thinkdj

    <?php
    function filename_safe($filename) {
    $temp = $filename;
    // Lower case
    $temp = strtolower($temp);
    // Replace spaces with a ’_’
    $temp = str_replace(” ”, ”_”, $temp);
    // Loop through string
    $result = ”;
    for ($i=0; $i<strlen($temp); $i++) {
    if (preg_match(’([0-9]|[a-z]|_)’, $temp[$i])) {
    $result = $result . $temp[$i];
    }
    }
    // Return filename
    return $result;
    }
    ?>

    More from "PHP"

    Find what you are looking for

    Recently added

    Categories

    Blogulate

    Keeping you updated of the latest fads and developments of the industry via amalgamated web content.

    Join us

    Post articles on blogulate and monetize them. Learn more »

    Stay updated

    Subscribe now and stay aware of the latest trends and happenings on the www. Get notified via email when we update.

    Enter your email address:

    Blogulate is based on Magnus premium theme by WizeDesigns
    © 2009 Blogulate. Some rights reserved.