|
|
|
Tuesday, 31 January 2012 23:39 |
// ZIP File PHP source code script credits devco.net
//download this function first - http://uk2.php.net/manual/en/ref.zip.php
require ("incl/zipfile.inc.php");
$zipfile = new zipfile();
$filedata = implode("", file("incl/zipfile.inc.php"));
$zipfile->add_dir("incl/");
$zipfile->add_file($filedata, "incl/zipfile.inc.php");
header("Content-type: application/octet-stream");
header("Content-disposition: attachment; filename=zipfile.zip");
echo $zipfile->file();
?>
Credits: 4DLink Web Lists and Web 4 link Read more: |
|
|
Thursday, 19 January 2012 10:00 |
|
The Perfect Server - CentOS 6.2 x86_64 With nginx [ISPConfig 3]
This tutorial shows how to prepare a CentOS 6.2 x86_64 server for the
installation of ISPConfig 3, and how to install ISPConfig 3. ISPConfig 3
is a webhosting control panel that allows you to configure the
following services through a web browser: nginx web server, Postfix mail
server, MySQL, BIND nameserver, PureFTPd, SpamAssassin, ClamAV,
Mailman, and many more. Since version 3.0.4, ISPConfig comes with full
support for the nginx web server in addition to Apache; this tutorial
covers the setup of a server that uses nginx, not Apache. Read more: |
|
Wednesday, 18 January 2012 09:45 |
PHP MySQL Select Row Randomly Fast
//CODE FROM WWW.GREGGDEV.COM
function random_row($table, $column) {
$max_sql = "SELECT max(" . $column . ")
AS max_id
FROM " . $table;
$max_row = mysql_fetch_array(mysql_query($max_sql));
$random_number = mt_rand(1, $max_row['max_id']);
$random_sql = "SELECT * FROM " . $table . "
WHERE " . $column . " >= " . $random_number . "
ORDER BY " . $column . " ASC
LIMIT 1";
$random_row = mysql_fetch_row(mysql_query($random_sql));
if (!is_array($random_row)) {
$random_sql = "SELECT * FROM " . $table . "
WHERE " . $column . " < " . $random_number . "
ORDER BY " . $column . " DESC
LIMIT 1";
$random_row = mysql_fetch_row(mysql_query($random_sql));
}
return $random_row;
}
//USAGE
echo '';
print_r(random_row('YOUR_TABLE', 'YOUR_COLUMN'));
echo ' ';
?>
Credits: 4dlink web lists and web4link.com Read more: |
|
|
Thursday, 12 January 2012 12:37 |
|
The Perfect Server - CentOS 6.2 x86_64 With Apache2 [ISPConfig 3]
This tutorial shows how to prepare a CentOS 6.2 x86_64 server for the
installation of ISPConfig 3, and how to install ISPConfig 3. ISPConfig 3
is a webhosting control panel that allows you to configure the
following services through a web browser: Apache web server, Postfix
mail server, MySQL, BIND nameserver, PureFTPd, SpamAssassin, ClamAV,
Mailman, and many more. Since version 3.0.4, ISPConfig comes with full
support for the nginx web server in addition to Apache; this tutorial
covers the setup of a server that uses Apache, not nginx. Read more: |
|
|
|
|
|
|
Page 1 of 9 |