stargeek
PHP news website logo.
home    PHP scripts    articles    seo tools    links    search    contact    shop    realtors


Tips on Defensive Coding







Tips on Defensive Coding

Tips on Defensive Coding 04/12/2004 04:52 PM

In this second excerpt from Advanced PHP Programming, George Schlossnagle offers advice on how to defend against both attacks and carelessness.




This is a GrokNews Entry: (what is grok?)





Similar Items

Tips on Defensive Coding

Grok Headline matches for Tips on Defensive Coding

Defensive design for the Web


Defensive design for the Web 03/08/2004 11:26 PM

37signals 37Signals and Jason Fried have put out a book.  It's called Defensive design for the Web.

Jason is super smart - so I'd recomend the book.  Jason and 37Signals is one of those companies I really wanna work with one day.


Putin on the defensive


Putin on the defensive 09/03/2004 11:55 AM
The Russian president may use the school siege to rally support for his Chechen policy, says News Online's Paul Reynolds

Microsoft on defensive in EU


Microsoft on defensive in EU 11/12/2003 02:56 PM
CFCN Plus Nov 12 2003 2:12PM ET

New wireless systems put 3G on the
defensive


New wireless systems put 3G on the
defensive
06/03/2004 04:57 PM
CNN Jun 3 2004 8:00PM GMT

Students' Data on Web, and N.Y.U. on
Defensive


Students' Data on Web, and N.Y.U. on
Defensive
01/10/2004 01:31 AM
N.Y.U. notified about 1,800 of its students that their Social Security numbers, phone numbers, and names had been posted on the Internet.

DJs Defensive At iPod Assault


DJs Defensive At iPod Assault 07/21/2004 01:07 AM
Two prominent radio programmers told The Post they've got what computers don't -- and never will. By John Mainelli, New York Post (via MyAppleMenu)

Book review: Defensive Design for the
Web


Book review: Defensive Design for the
Web
05/13/2004 03:37 AM
Contingency design lets you take all those things into account that can happen when real users start visiting your website. Defensive Design for the Web is a book that shows you in a clear and concise way what can go wrong and how to turn that to your advantage.

Democrats Keeping Bush on the Defensive
(AP)


Democrats Keeping Bush on the Defensive
(AP)
02/14/2004 06:35 PM
AP - His poll numbers sagging and Democratic criticism unrelenting, President Bush has responded with abrupt turnabouts over the past 10 days on Iraq war intelligence, his own military service record and cooperation with a panel investigating the Sept. 11 attacks.

California Prison Guards on Defensive


California Prison Guards on Defensive 06/22/2004 10:48 AM

  • Mercury News (reg req): Guard union in showdown. For more than a decade, California's prison guards have had it their way. Hefty salary increases that outpaced most state workers have made them among the highest-paid prison guards in the country. Favorable overtime rules last year brought the paychecks of 362 officers over $100,000. The guards' union, a generous campaign donor, has been allowed a strong hand in running prisons. But the union's currency, literally and figuratively, has suddenly been devalued. Gov. Arnold Schwarzenegger, the state's wealthy, increasingly popular leader, neither wants nor needs the group's contributions. The very strength of the prison guards' union has become a weakness.
  • About time, too. California's prison-industrial complex is one of the reasons the state has gotten into such trouble, fiscal and otherwise. Our prison population grows, in large part due to the idiocy of the War on (Some) Drugs, which treats a medical problem as a criminal one and creates entire new classes of criminals. Meanwhile, our schools continue to wither. Some public policy that is. The guards have a tough job. But they've created a monster of their own, and now they're being held to account. Let's hope the legislative reformers stick to their guns on this one.


    Kazaa plans defensive ad campaign


    Kazaa plans defensive ad campaign 11/13/2003 08:53 AM

    Stocks 2004: Defensive Posture


    Stocks 2004: Defensive Posture 01/07/2004 05:18 PM
    One "Stocks 2004" selection's products received rave reviews during the Iraq War.

    NFL Defensive Great Reggie White Dies
    (AP)


    NFL Defensive Great Reggie White Dies
    (AP)
    12/26/2004 08:15 PM
    AP - Reggie White, a fearsome defensive end for the Philadelphia Eagles and Green Bay Packers and one of the NFL's greatest players, died Sunday, his wife said. He was 43.

    New Wireless Systems Push 3G Onto the
    Defensive (Reuters)


    New Wireless Systems Push 3G Onto the
    Defensive (Reuters)
    06/03/2004 08:38 AM
    Reuters - Third-generation mobile phone services are finally here after a mammoth effort that cost the industry at least $123 billion, but new systems that operate much faster already threaten to consign 3G to history.

    Lebanese Officials on Defensive Over
    U.N. Report (Reuters)


    Lebanese Officials on Defensive Over
    U.N. Report (Reuters)
    03/25/2005 09:16 AM
    Reuters - Lebanese authorities, put on the defensive by a damning U.N. report on security failings, indicated Friday they would accept an international inquiry into the killing of former Prime Minister Rafik al-Hariri.

    U.S. bioterrorism research leaps past
    defensive tactics


    U.S. bioterrorism research leaps past
    defensive tactics
    06/09/2004 08:52 PM
    U.S. bioterrorism research leaps past defensive tactics - Scientists are now able to explore creating genetically engineered superbugs, plus the means to mass-produce and spread them ... 'If any other country set forth a program like this, U.S. intelligence undoubtedly would call it an offensive program,' said Edward Hammond, head of the Sunshine Project, a group in Austin, Texas, that tracks bioweapons and biodefense issues.

    Guard flap keeps White House on
    defensive (USATODAY.com)


    Guard flap keeps White House on
    defensive (USATODAY.com)
    02/11/2004 09:40 AM
    USATODAY.com - President Bush will make a speech Wednesday on the dangers of nuclear proliferation. He might be relieved to be talking about an issue that isn't a politically damaging controversy.

    The Onion | 'Well, You Try To
    Reconstruct Iraq,' Says U.S. Defensive
    Dept.


    The Onion | 'Well, You Try To
    Reconstruct Iraq,' Says U.S. Defensive
    Dept.
    10/30/2003 09:16 AM
    The Onion: 'Well, You Try To Reconstruct Iraq,' Says U.S. Defensive Dept .. Lawrence Pettibone .. So fucking funny .. hehehe

    theonion.com/3942/news1.html
    track this site | 6 links


    IAC'S Diller says Ask Jeeves deal partly
    defensive


    IAC'S Diller says Ask Jeeves deal partly
    defensive
    03/31/2005 12:24 AM

    Bush on Defensive Amid New Iraq
    Criticism (Reuters)


    Bush on Defensive Amid New Iraq
    Criticism (Reuters)
    07/14/2004 01:55 PM
    Reuters - President Bush was on the defensive again on Wednesday amid new criticism -- this time from Britain -- of the intelligence used to justify the Iraq war.

    Race case puts Tangible Benefit on the
    defensive


    Race case puts Tangible Benefit on the
    defensive
    01/26/2004 12:34 PM
    Computer Weekly Jan 26 2004 4:17PM GMT

    Coding and Climbing


    Coding and Climbing 04/02/2005 03:48 PM
    It had never occurred to me that writing software is like climbing Mt. Fuji, but Step han Grell makes it all clear.

    Coding Frenzy


    Coding Frenzy 05/14/2004 09:02 AM
    Warning: techtalk follows, you may freely skip this if your eyes glaze over at the word "XML".

    I've been in a coding frenzy for the past couple of days. JSPWiki has had some considerable additions, here being the relevant part of the ChangeLog:

    2004-05-14  Janne Jalkanen 
    <Janne.Jalkanen@nospam.ecyrd.com>
    
            * v2.1.97.
    
            * Added preliminary support for the Atom blog API.  It still
    does
            not yet completely work, however.
    

    I'll be a non-productive member of the society for the next three-four days (another wedding? Don't people get tired of these things already?), so nothing much may happen. But yeah, I nearly got ecto working with JSPWiki.

    There is still however a question on how the blog and wiki apis should interact. You see, the page Main on this site is both a weblog and a wiki page. I'm having trouble, you see:

    • GET to /atom/ lists all wiki pages (which means that even on this site, there are a lot of them) - not just the weblogs (since every page can be a weblog, even the weblog entry pages)
    • GET to /atom/Main... Should it list all of the blog entries, or should it GET the Wiki page content? Both are valid interpretations...

    I'm confused... Which is the correct way to handle this? Should a WikiWebl og combination have separate URIs for Wiki and Weblog functionality? Isn't that kinda redundant?


    PHP Coding Standard


    PHP Coding Standard 11/27/2002 09:47 PM
    Learn how to develop your own coding specifications.

    PHP Coding Contest


    PHP Coding Contest 07/17/2002 11:07 AM
    Codewalkers.com has posted their latest PHP Coding Contest.

    Why You Need Coding Standards


    Why You Need Coding Standards 09/23/2004 03:07 AM
    WebmasterBase Sep 23 2004 7:30AM GMT

    The Coding Monkeys


    The Coding Monkeys 05/18/2004 07:35 AM
    you can read all about it & download it from here .. the application formerly known as Hydra .. SubEthaEdit: Introducing version 2.0 .. SubEthaEdit; .. SubEthaEdit .. Rock on !! .. More >

    codingmonkeys.de/subethaedit
    track this site | 5 links


    Coding standards 101


    Coding standards 101 05/31/2002 08:11 AM

    PHP coding guidelines


    PHP coding guidelines 01/05/2004 12:27 PM
    The guidelines that I follow when writing my PHP scripts; can be helpful to have something like this if you're working on a joint project.

    YSL Coding Libraries


    YSL Coding Libraries 12/11/2003 06:12 PM
    Transfer of CVS repository in progress

    Bar Coding The World Away


    Bar Coding The World Away 07/12/2004 12:55 PM

    Useful Applescripts for coding PHP in
    BBEdit


    Useful Applescripts for coding PHP in
    BBEdit
    12/12/2003 07:48 PM
    At work I spend a lot of time coding, which means I also spend a lot of time using BBEdit . Thankfully it's a fantastic program with excellent Applescript integration. As a PHP coder, I thought I'd share some of the great Applescripts that are out there to enhance your coding experience, and hopefully save you some time. VoidFil lPHP This is a PHP code completion script. Type the beginning of function name, hit F1 (or whatever key you've assigned it to), and it provides a list a potential matches (e.g. type html and you can choose from html_entity_decode, htmlentities or htmlspecialchars). Search php.net for selection It does what it says on the tin. Highlight a PHP function or keyword, hit the assigned key combination, and it fires up a browser window and searches through the manual on php.net for the function or keyword. Very useful if you've not got a PHP reference book handy. PHP Syntax Check Written by John Gruber (a former Bare Bones developer, so he obviously knows a thing or two), this flexible script can scan your document for PHP parsing errors (highlighting the problematic lines). The script can also replace the built-in HTML Document Syntax command, so it can check the syntax of your HTML also. Pretty nifty huh? What other Applescripts make your BBEdit life easier?

    Wavefront Coding for phonecams


    Wavefront Coding for phonecams 09/14/2004 03:48 AM
    Xeni Jardin: A new type of lens may make blurry phonecam snapshots a thing of the past:
    A specially shaped camera lens and processing method to ensure images are always in focus has been developed. Physicist Dr Andy Harvey said it was a "simple system with a simple lens" which uses an optical encoder so that no information in images is lost. Developed primarily for military night vision cameras, the technology could find its way into camera phones.
    Link (thanks, Siege)

    Zend's PHP 5 Coding Contest


    Zend's PHP 5 Coding Contest 06/06/2004 06:37 AM
    Zend's PHP 5 Coding Contest is underway and accepting submissions. This is every developer's chance to flaunt their PHP 5 skills and let their application shine! Applications will be rated both by your peers and by a panel of judges assembled from among the most known and well-respected names in the PHP community. Lots of prizes are available!

    New PHP coding contest at Codewalkers


    New PHP coding contest at Codewalkers 12/09/2002 05:10 AM
    Win a whole lotta stuff—including a one-year subscription to php|a—with a bit of your PHP magic

    Parenting and a Career in Coding?


    Parenting and a Career in Coding? 06/04/2004 07:05 PM

    Nice, secure coding


    Nice, secure coding 09/09/2004 04:47 PM
    Meanwhile, on a irc channel in a galaxy far, far away: 23:18 <gav> also $x=$cgi->param(‘x’); &{$x}(); It’s always good to...

    PHP-Editors.com: New PHP Coding Contest


    PHP-Editors.com: New PHP Coding Contest 04/13/2004 07:25 AM
    New from php-editors.com this morning is their latest PHP Programming Contest.

    How Would You Handle a $1,000,000 Coding
    Error?


    How Would You Handle a $1,000,000 Coding
    Error?
    07/19/2004 11:48 PM

    SitePoint: Why You Need Coding Standards


    SitePoint: Why You Need Coding Standards 09/23/2004 08:58 AM
    In a new article on Sitepoint, David Mytton explains why coding standards are important not only to the individual developer or development team, but to the script users as well. He takes a problem-solution approach to creating maintainable code, peeks at different coding standards, and also has a zip file of his own coding standards that you may want to use.
    Grok Description matches for Tips on Defensive Coding
    GrokA matches for Tips on Defensive Coding

    Tips on Defensive Coding

    The following phrases have been identified by the grok system as matching this entry:

















    Also check out:


    Grok

    Ipod Porn on the
    Rise

    Brief Abstract of
    Wikipedia's
    Mesothelioma Cancer
    page

    Get first aid
    instructions in your
    cell phone

    IE is crap
    JSPWiki gains
    podcasting support

    Update: Microsoft,
    InterTrust settle
    patent case for
    $440M

    Microsoft to cut
    some Longhorn
    features

    Three states ask to
    join Oracle
    antitrust suit

    Intergraph, AMD
    reach Clipper patent
    accord

    CRM software on a
    smaller scale

    IBM acquiring Daksh
    CEOs urged to take
    control of
    cybersecurity

    Mother of all
    gravity games 0.8

    ShiftyGames Hangman
    0.9.2

    X-Chat 2.0.8
    Spakes 0.7.2
    Dialogos 0.5
    wbmtranslator 0.2.0
    Mr. Voice 1.10.4
    TUTOS 1.1.20040412
    Midi Grasshopper 3.8
    Break Your Record
    for 100 Math Tables
    1.3

    CocoModX 0.3.3
    Hollow Ground 1.1
    ListSaver 2.0
    Super Blingo 3.0.1
    Ban on Weight-Loss
    Herb Ephedra Takes
    Effect (Reuters)

    Tiger Woods Arrives
    for Military
    Training (AP)

    Barr Tries to Revive
    Clinton-Flynt Suit
    (AP)

    Bush to Answer
    Questions in Prime
    Time (AP)

    Microsoft Settles
    InterTrust Patent
    Suit (AP)

    Replacing Complex
    Hardware With Mobile
    Phones

    Can You Go To Prison
    For Copying A Chat
    Transcript?

    Not you. Sorry. Ok,
    you can come in.

    Jon Stewart
    interview

    PowerMac G5
    Cooling/Sensor
    Issues?

    Mullah Omar
    interview

    Buffy meets Bilbo et
    al.

    Double Crossing the
    Rubicon

    The real slim shady
    gum, check.
    household cleaning
    product, check.

    Microsoft shuffles
    execs to combat
    security flaws

    Study: Bright
    picture for digital
    TV sales

    mnoGoSearch v3.2.16
    Becky! Internet Mail
    v2.09.01

    HMonitor v4.1.4.1
    SoundEdit Pro v1.3
    System Inspector
    v1.1

    Webroot Spam
    Shredder v1.4

    Kerry Starts College
    Tour With Focus on
    Economy

    Russian Oil Tycoon
    to Fight Corruption
    Charges

    Coca-Cola's Chief
    Lawyer Steps Down

    NH judge throws out
    paedo chat-log
    evidence

    The Star Wars
    Trading Card Game's
    First Banned Card

    Verari Sets Sights
    on 'Ultimate Blade
    System' (Ziff Davis)

    what is grok?