• Coding

    January 26th, 2006
    Coding
    Article Preview When people consider the primary strengths of PHP in internet-enabled applications, the first item on the list is usually how easy and flexible PHP is, by default. While this is very true, PHP, if used improperly, can open up numerous security issues that should always be considered during the design phase of any development efforts. This paper focuses on these potential pitfalls and addresses several ways to “harden” your codebase to be as secure as possible.1. ALWAYS CONSIDER (AND ASSUME) THE WORST ABOUT YOUR DATA

    When you think of creating a Web application (or any application, for that matter), you should always think, in the most paranoid manner possible, of how people will want to interact with it. Every time something needs to be sent to your application, such ...
    Read More Read More
    December 12th, 2002
    Coding
    Article Preview PHP is an embedded scripting language, where the scripts are directly built into hypertext files and are executed on a web server. A PHP program utilizes the tags <?php, ?>. An interpreter processes commands between this pair of tags and forms the final file and is then served to a web browser.

    One of the strongest points of PHP (which at the same time is its weakest point) is that PHP is very easy to learn.PHP is an embedded scripting language, where the scripts are directly built into hypertext files and are executed on a web server. A PHP program utilizes the tags <?php, ?>. An interpreter processes commands between this pair of tags and forms the final file and is then served to a web browser.

    One of the strongest points of PHP (which at the same time is its weakest point) is that PHP is very easy to learn. It attracts many people. However, despite its seeming simplicity, it’s not so easy to learn how to use this language in an effective and correct way. In this article I will show you some different examples of useful PHP hints, which are usually ignored by novice programmers.

    1. The variable of variables
    Dynamically changed variable names (changed during operation of a script) can be very convenient to use in a script. Here is an example of what I mean:

    This example assigns the value “hello” to a variable with the name ‘a’: $a = ’hello’;
    In this next operation, we assign the value of the variable 'a', the value "world": $$a = ’world’;
    In effect, this is the same as this statement: $hello = 'world';

    We can display the output from these variables with either of the following:
    <?php echo $a.’ ‘.$$a; ?>
    <?php echo $a.’ ‘.$hello; ?>

    Both statments produce the output ‘hello world’.

    The same technique can be applied to arrays. You will have to use a little bit more complicated syntax:
    ${$a[1]} which stores a value ...
    Read More Read More
    September 12th, 2002
    Coding
    Article Preview Have you ever visited a thumbnail gallery post that automatically checked your gallery submission? Richard's Realm and The Hun are just two heavyweights utilizing applied Web spider technology to increase productivity.Have you ever visited a thumbnail gallery post that automatically checked your gallery submission? Richard's Realm and The Hun are just two heavyweights utilizing applied Web spider technology to increase productivity. Thumbnail gallery recognition is an excellent chore for automated Web robots capable of counting links, screening text for banned keywords, and declining galleries with JavaScript popup windows. Google, AltaVista, and FAST Web spiders scour the Internet constantly, refreshing massive databases with new caches as often as ...
    Read More Read More
    September 12th, 2002
    Coding
    Article Preview Have you ever visited a thumbnail gallery post that automatically checked your gallery submission? Richard's Realm and The Hun are just two heavyweights utilizing applied Web spider technology to increase productivity.Have you ever visited a thumbnail gallery post that automatically checked your gallery submission? Richard's Realm and The Hun are just two heavyweights utilizing applied Web spider technology to increase productivity. Thumbnail gallery recognition is an excellent chore for automated Web robots capable of counting links, screening text for banned keywords, and declining galleries with JavaScript popup windows. Google, AltaVista, and FAST Web spiders scour the Internet constantly, refreshing massive databases with new caches as often as ...
    Read More Read More
    July 27th, 2000
    Coding
    Article Preview "Hereby you reduce the time it takes to code, hence, making you more productive!"In a previous article I mentioned perl modules, and how modularising your code can be a good thing. We're going to take it a step further this time and discuss Perl Objects. Perl's definition of an object is very simple: "An Object is a reference to a thingie that belongs to another thingie".



    Says much doesn't it? What it comes down to - an object is a variable that belongs to a specific class. An example:




    package MyThingie;

    sub new {
    my $that=shift;
    my $this=ref($that) || $that;
    my $self={};
    bless($self, $this);
    return $self;
    }




    Basically, what that did is create an object. You use that one as follows:




    use MyThingie;
    $thing=new MyThingie;


    There you go. You blessed 'thing' into the 'MyThingie' class. Now, the fun part about objects is that you can move them around at will. If I wanted 10 MyThingie objects, I could create 10 and push them into an array. You can also store variables and ...
    Read More Read More

1 2 3 4 5