46 Comments
- Diablo84, on 10/12/2007, -0/+28I advise you use these scripts with caution. I cannot speak for the entire collection, having not looked at every script, but the few that i did see were very subpar. Too many people rely on notices/warning being hidden (via their php.ini error_reporting setting), for a script to function correctly. In truth a lot of scripts out there are erroneous - you may have hidden the error, but it is still there.
People tend not to realise their code is incorrect, because PHP "corrects" their mistake for them. eg:
$var = array('one' => 'hello', 'two' => 'world');
echo $var[one];
PHP will assume you was referring to the array key: 'one', as opposed to the constant: one, which does not exist.
echo $var['one'];
... is correct. If your PHP installation is not configured to show all errors, it will appear to be correct, so you will not be aware of your mistake.
In the same instance, don't use:
if ($_GET['var'] == 'value') {
If the var key is not present in the query string, you are referencing an unidentified index in the _GET super global array.
use:
if (!empty$_GET['var']) && $_GET['var'] == 'value') {
or similar with isset, depending on what you are doing.
Apologies for the long post, i figured it was necessary here. - pbaehr, on 10/12/2007, -0/+23You'll be seeing a lot of that until you stop linking your blog in all your comments...*****.
- Diablo84, on 10/12/2007, -0/+17if (!empty($_GET['var']) && $_GET['var'] == 'value') {
Ironically, i missed a bracket in my haste :) - legendxx, on 10/12/2007, -3/+16die
- t0ny, on 10/12/2007, -1/+13You mean
<?php die(); ?> - SniperX, on 10/12/2007, -1/+12Well, if you couldn't get those basic PHP scripts implemented and working (sans ob_flush, which is a step beyond beginner) then go first learn some PHP.
The scripts are correct, mostly, though I do agree some commenting would help beginners. - king1337, on 10/12/2007, -2/+9Thanks for the resource!
- RobertGonzalez, on 06/11/2008, -3/+7Diggin the wally, feelin the flow...
- Scarblac, on 10/12/2007, -0/+2It's a term from politics and marketing, actually ( http://en.wikipedia.org/wiki/Astroturfing ).
Way to make yourself look stupid. - aaronhall, on 10/12/2007, -0/+2@sirsteveh: The shut-up operator (@) is slow, and is being considered for deprecation or removal in PHP6. It's never good practice to hide warnings and notices -- rather, fix what's causing the error (as Diablo demonstrated).
- afred, on 10/12/2007, -0/+2I really like that walrus.
- g3r4, on 10/12/2007, -0/+2We hate it because we personally don't give a ***** about some *****'s opinions. We're at digg to read news and apparently flame from time to time, but not to get an advertisement of someone's blog (Hence, the ***** reference).
- PRlME, on 10/12/2007, -1/+3^always got to be a dumb ass on every digg.
- SnakeO, on 10/12/2007, -0/+2Serious question though:
I personally do not blog. So is the reason people hate other people on digg for linking to their blogs in their sigs is because they blog themselves and they feel it is unfair?
Again, serious question, not trying to bag on anyone. - whiteyMcBrown, on 10/14/2007, -0/+1this one: http://www.bigbold.com/snippets/tag/php
- inactive, on 10/12/2007, -0/+1I used to visit EvilWalrus when it was EvilWalrus.com, I've been contemplation opening a similar site to replace it.
- Skotasma, on 10/12/2007, -0/+1wow... that's BAD...
Hello World in PHP -> "Mommy! I know PHP!"
Basic SELECT query in MySQL ->"AND SQL. It's gotta be true, it's on the internet."
Sorry, just couldn't help it ;)
Some are actually interesting, if only for what you might do with PHP. And yes, most code lacks comments, so before I wrap my head around somebody else's code I rather write my own - where's the fun if you don't?
Just another site in the long list where you can "borrow" a little piece of code.
Guess that's just what they intended it to be.
*I don't even have a blog* /cry Does a web server IP count? - sirsteveh, on 10/12/2007, -0/+1@Diablo84: You don't really need to check !empty($_GET['var']), because checking it against 'value' ensures that it's not empty. If you have notices on (which you may if you're interested in having the most completely correct code possible), you can do this:
if(@$_GET['var] == 'value') {
as @ suppresses all error/warning messages from using a piece of code. - qeek, on 10/12/2007, -1/+2Thank you.
- danggit, on 10/12/2007, -0/+1A much needed resource for an independent student that likes to learn by example :) Thanks a lot, duggit xD
- sebrOck, on 10/12/2007, -0/+1thanks
- TheRunes, on 10/12/2007, -0/+1Personally I prefer MyBB ( http://www.mybboard.com ), but I do like flat files. There was another good flat file board called NavBoard or something like that. I don't have the URL for that one though.
- serkanyersen, on 10/12/2007, -0/+1nicee
- PRlME, on 10/12/2007, -0/+1Question on the Pandora Web Site the ADs and the back ground cycles is that also dont with PHP or can it be done with PHP?
and um whats Rails oppose to PHP? - spargo, on 10/12/2007, -0/+1@subxero37
Flat-file forums are typically terribly slow, especially when compared to something such as MySQL. I've had web hosts before that don't allow flat-file forums for the sake of sparing the web server. - gdgi, on 10/12/2007, -0/+1@Snake0
it's not that people link to their blogs, it's the simple fact that so many people post extremely short, basically useless comments (gee that was teh r0x0r) to try and make their comments seem valid and not astroturfing, but then type more characters putting their url / blog link in the comment.
The unfortunate thing is that google will probably still pick up the links from the comments, no matter how far down we 'bury' them - as long as their link is in the page html, and the page in question is popular, it helps their page rank on google and other search engines.
This is a very common tactic for astro turfing leeches like the person in question ;} - vijayanand12003, on 01/12/2009, -0/+1try this site
http://phptutorial.110mb.com - SnakeO, on 10/12/2007, -1/+1^^^^^^^^
Is that a serious question?*
*note: i just did this so no one else would. - inactive, on 10/12/2007, -1/+1I've used eBlah since YaBB died many years ago.
eBlah is a really fleshed out free forum. Would you happen to know how good this is compared to that? - TangentThought, on 10/12/2007, -1/+1"It's very customizable, well-commented, and very fast"
Let's see how fast it is when lots of digg users use it at once. - Scripts, on 10/04/2008, -0/+0Great and very useful list of PHP scripts.
Thank you for sharing it. - ipodupodwepod, on 10/12/2007, -0/+0astro turfing. who makes up these ridiculous names other than nerds
- 123zoozle, on 12/17/2007, -0/+0Thanks for the list and sharing it.
http://www.webdesignersindia.net/ - techtonik, on 10/12/2007, -1/+0Be aware that all snippets by default are posted under OSL license and are not all that free - they all carry limitations similar to GPL license as OSL is "copyleft" or "viral" variant of GPL with almost the same conditions described at http://en.wikipedia.org/wiki/Open_Software_License
Try this one: http://www.bigbold.com/snippets/tag/php - subxero37, on 10/12/2007, -1/+0I guess that would depend on the server...
Also, that's why I didn't post a link to his homepage. It's not hard to find it, though. - Eirik90, on 10/12/2007, -2/+0Nice DonWilson! Hope it makes an success ;) Post it at Digg when you're done :D
- BigBadHoss, on 10/12/2007, -4/+2anyone ever heard of sourceforge?
- evilpig, on 10/12/2007, -7/+5Not nice. The first 10 scripts I tried don't work. Very lame site.
- Jack9, on 10/12/2007, -5/+2Not all PHP. Some not even worth calling "scripts". Marked inaccurate.
1. class HelloWorldApp {
2. public static void main(String[] args) {
3. System.out.println("Hello World!"); // Display the string.
4. }
5. } - Buddha443556, on 10/12/2007, -6/+1Just glad it's back!
- hawleyjr, on 10/12/2007, -7/+0Awesome ;)
- subxero37, on 10/12/2007, -8/+0One of my favorite scripts is called FlatForum, written by my friend Plasma. It's a very professional PHP-based forum using only flat text files as its database (i.e., no MySQL.) It's very customizable, well-commented, and very fast. I've been using it for years on my own site.
The script: http://www.hotscripts.com/Detailed/65711.html - MistaMatt90, on 10/12/2007, -12/+4nice
- inactive, on 10/12/2007, -11/+1Niiicce. [/southpark]
- arjunm, on 10/12/2007, -25/+1That ain't so friendly?
http://www.kamu.ch/blog -> for the sophisticated geek. - arjunm, on 10/12/2007, -32/+2One for the bookmarks.... thanks.
http://www.kamu.ch/blog -> for the sophisticated geek.


What is Digg?
Check out the new & improved