Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged php



1 ... 12 13 14 15 16 ... 58
This is a little PHP class that permits to start quickly the creation of a webpage. When you declare an instance of the class it automatically starts the output buffering and gzip compression, it outputs all the proper tags (doctype, meta, stylesh...
0 1074 posted 14 years ago by claudiowebdesign
0 1356 posted 14 years ago by focal55
This is a very rudimentary function used to convert a Datetime delivered by the Twitter API to a format you can store in MySQL's datetime field.
0 2248 posted 14 years ago by aristoworks
Script para usar la librería PHP Mailer para enviar un mail usando gmail como servidor SMTP. Se debe descargar la librería phpMailer (www.phpmailer.worxware.com). Se usa una plantilla html para maquetar el cuerpo del mensaje. Desde un serv...
0 1572 posted 14 years ago by alberomo
Place at the top of your header.php to redirect visitors who are not logged-in to the Wordpress admin. I use this to redirect to a simple HTML 'coming soon' page while sites are in development.
1 1581 posted 14 years ago by adambundy
1. Get Posts however you see fit 2. Loop through the posts getting the terms from taxonomies and add them to the Post object 3. Sort the Array of Post Objects by the property you want them sorted by using sort_on_field()
0 1845 posted 14 years ago by kingkool68
0 1186 posted 14 years ago by otternq
To find the count of number of files in a directory, use this.
0 1054 posted 14 years ago by taqin
Codigo base de un plugin para wordpress
0 1186 posted 14 years ago by foxnetorka
Codigo base para un widget en Wordpress
0 1244 posted 14 years ago by foxnetorka
It uses a variable with a RecordSet. db_query PHP Functions can be used to have the REcordSet(http://snipplr.com/view/59419/php-connexion-to-mysql-ddbb-sql-query-and-creation-of-a-record-set/). Then fill the tables with the data of the RecordSet.
0 1243 posted 14 years ago by alberomo
That's something quick. A basic php class to manage properly a database. Thanks to magic methods opening a database is almost automatic.
1 2495 posted 14 years ago by claudiowebdesign
PHP code for connect to MySql, create a SQL query and a Record Set from it. Note: If you use ADODB php library, write db_query() instead of mysql_query().
0 1684 posted 14 years ago by alberomo
0 1736 posted 14 years ago by sybrex
It uses a variable with a RecordSet from a ADOdb Library (Library must be downloaded). db_query PHP Functions can be used to have the REcordSet(http://snipplr.com/view/59379/dbquery-php-function-for-ddbb-queries-with-adodb-library/) Then uses ADOD...
0 1221 posted 14 years ago by alberomo
A PHP function to get a Record Set using ADOdb Library. It takes the (SQL) query as an argument. For INSERT queries. NOTE: A call for a query. It also need next variables: $dbhost,$dbuser,$dbpasswd,$dbname (data from de bbdd connexion). Can be...
0 1555 posted 14 years ago by alberomo
A PHP function to get a Record Set using ADOdb Library. It takes the (SQL) query as an argument. For SELECT,UPDATE and DELETE queries. It also need next variables: $db_host,$db_user,$db_passwd,$db_name (data from de bbdd connexion). Can be dec...
0 1459 posted 14 years ago by alberomo
0 2400 posted 14 years ago by szpunk
Takes the collection 'david' and gives a unique array of the keys used.
0 1488 posted 14 years ago by lemcoe9
I am having a bit of trouble figuring out what goes where in my application. I guess this is something of a fundamental lack of understanding I have, and I'm hoping somebody might be able to clear things up. This is all very much pseudo code. In...
0 1178 posted 14 years ago by shoelessone
There seems to be no easy way to insert a key and value at the beginning of an array, as array_unset does not allow you to specify a key. This is not a very efficient way to do it, but it works. Pretend the array is currently: array("a"=>"b", "c"...
0 1876 posted 14 years ago by lemcoe9
Transform $_GET or $_POST in a string to add to an URL and send variables and values. Argument: Receive an $_GET O $_POST array function. Returns: variables concatenation to add to the URL.
0 1428 posted 14 years ago by alberomo
0 2241 posted 14 years ago by genseric
Get number and returns a spaced string (14563 -> 14 563)
0 1225 posted 14 years ago by dhjapan
Check and Set Default HTTP GET (Verifica e define padrão para parametro HTTP GET)
0 1206 posted 14 years ago by cdohost
1 ... 12 13 14 15 16 ... 58