Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 120 121 122 123 124 ... 147
5 1755 posted 16 years ago by jamesming
This function simply takes a Windows UTC timestamp and converts it to Unix epoch. This was useful when I was pulling LDAP information from Active Directory and the timestamps were ridiculous. Windows builds timestamps by counting seconds since Janua...
0 1708 posted 16 years ago by cllorca
The .jpg extension can be changed to any extension. So if you want to pull out only .txt files, you just need to replace the .jpg with .txt. If you want to list ALL files, just remove the condition.
1 1912 posted 16 years ago by fackz
2 1208 posted 16 years ago by blubadger
Export entire database schema to local xml file.
1 1423 posted 16 years ago by jonniespratley
0 1160 posted 16 years ago by muhammet
The best part about this script is that any table you put in the query on line 14 will be the headers and data in the CSV. No need to hand type out all the table headers unless you want to comment that section out and put in your own. So if you have...
2 1657 posted 16 years ago by fackz
2 1560 posted 16 years ago by iTony
1 1567 posted 16 years ago by iTony
Database backup function that you can call whenever you want — including nightly CRONs.
6 2807 posted 16 years ago by fackz
Let's you render your .nfo Files to PNG Images.
1 1068 posted 16 years ago by rizzn2k
This function clean up phone number and present it in styled way.
9 2592 posted 16 years ago by naz
Use instead of standard "sql\_tablesort()" function. Handles multiple "sort" in $header, but the arrow will be only on last sorted column. This can be handled with rewriting theme_table, for example.
0 1331 posted 16 years ago by kurokikaze
These 4 lines of code can be used to extract and return all links from any page using regex patterns. If links are found, an array is returned, else boolean false is returned.
4 2312 posted 16 years ago by gdvickery
This method is a bit faster and more reliable then using the "explode" method. Works with PHP 4.0.3 and up.
4 1911 posted 16 years ago by gdvickery
Alternative to [http://snipplr.com/view/12616/strip-url-to-its-domain-name/](http://snipplr.com/view/12616/strip-url-to-its-domain-name/, "this snippet"), as it didn't come out clearly in the comments. Update - Edited based on gdvickery's commen...
3 1943 posted 16 years ago by duniyadnd
Very simple snippet to include if you want to auto update the year in a page copyright using PHP.
6 1787 posted 16 years ago by 1man
1 1697 posted 16 years ago by fackz
Para utilizar, proceda assim: echo formata_data_extenso('2007-04-17'); echo formata_data_extenso('2007-04-17 15:20:35');
1 1631 posted 16 years ago by fackz
Outputs an image path from a defined directory.
2 1632 posted 16 years ago by dsntos
To find your numerical Twitter ID, login to Twitter and click on your RSS feed (bottom of the page). The URL will look something like http://twitter.com/statuses/friends_timeline/12345678.rss. Your ID will be the 12345678.
9 1847 posted 16 years ago by nerdsane
The basis to a spider.
5 1922 posted 16 years ago by Unreal
Using this you can get the inside string from another given string. Great for scraping data from other sites.
0 1195 posted 16 years ago by Unreal
Nice simple snippet. Great for forum scripts.
1 1558 posted 16 years ago by Unreal
0 1404 posted 16 years ago by troynt
1 ... 120 121 122 123 124 ... 147