Welcome To Snipplr
Everyone's Recent PHP Snippets Tagged php
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Very simple to use.
**Calling:**
$files = dirContents(DIR_PATH, [FILTER, [TYPE]]);
**Examples:**
$files = dirContens("my-dir");
_$files_ is array containing all, both files either directories
$files = dirContens("my-dir",...
0
613
posted 14 years ago by Lostindream
A simple script to run with [drush](http://drupal.org/project/drush) to clean all Drupal nodes containing style tags.
1
843
posted 14 years ago by mongolito404
This small function receive a text as input and returns an html text with links if the source text contains urls (http://www… but also ftp://… and every other protocol), emails, twitter’s usernames (with @ at the beginning) and also twitter tag...
0
1145
posted 14 years ago by ginoplusio
Here is how to upload an attachment to a CouchDb document using PHP and cURL.
0
801
posted 14 years ago by stephanepericat
Here is an example where the likelihood of NS is 30%, SM is 50%, and SH is 20%. I make 20 pitches and output what the batter does each time.
0
998
posted 14 years ago by philokezzar
Changing Facebook Status with PHP, download the Mini Bot PHP class from the blog http://www.barattalo.it
1
1127
posted 14 years ago by ginoplusio
PHP function of mini bot class that lets you retrieve twitter infos from twitter nickname.
($this->attr method is part of the Mini Bot Class)
2
922
posted 14 years ago by ginoplusio
/**
* @param Int $week
* @param Int $year
* @return Array
*/
0
587
posted 14 years ago by jkjeldgaard
These are important object oriented principles (OOP) that one must understand in PHP to create dynamic web applications. I hope you find this useful in understanding inheritance.
0
662
posted 14 years ago by alvincrespo
This is the beginning of my retrieval of twitter status class...just something im playing with right now. It retrieves the xml, saves it on your server, then you can either use javascript or php to traverse the xml tree.
0
811
posted 14 years ago by alvincrespo
A handy, generic form processor which validates presence of fields marked in a hidden value, like: <input>. Easy to override and customize as needed.
Adapted from a script found in PHP 5 Unleashed.
1
1009
posted 14 years ago by nate63179
Aimed at designers who want to sprinkle in a little PHP to make development easier. If building/prototyping a site with HTML/PHP, this can save time by constructing the navigation list on the fly, based on re-usable navigation settings.
Usage: Ass...
0
624
posted 14 years ago by rareyman
Uses ajax upload from http://valums.com/ajax-upload/. Complete working script with front and back end validation. Enjoy.
1
1095
posted 14 years ago by vagrantradio
This snippet is useful if you want to include partials of another admin generated module into the current one (at runtime). This is necessary to *always* make sure that the partial is available, even after clearing the cache. And this is not always t...
0
720
posted 14 years ago by dreadwarrior