|
|
|
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: |
|
|
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: |
|
Wednesday, 15 June 2011 12:53 |
|
Debian Squeeze, Squid, Kerberos/LDAP Authentication, Active Directory Integration And Cyfin Reporter
This document covers setup of a Squid Proxy which will seamlessly
integrate with Active Directory for authentication using Kerberos with
LDAP as a backup for users not authenticated via Kerberos.
Authorisation is managed by Groups in Active Directory. This is
especially useful for Windows 7 clients which no longer support NTLMv2
without changing the local computer policy.
It is capable of using white lists and black lists for site access and
restrictions. Read more: |
|
|
Wednesday, 24 November 2010 10:26 |
|
Using Firewall Builder To Configure Router Access Lists
Firewall Builder is a firewall configuration and management
GUI
that supports configuring a wide range of firewalls from a
single application. Supported firewalls include Linux
iptables,
BSD pf, Cisco ASA/PIX, Cisco router access lists and many
more. This tutorial is the first in a series of howtos that will
walk through the basic steps of using Firewall Builder to
configure each of the supported firewall platforms. In this
tutorial we will configure Access Control Lists (ACL) on a
Cisco router. Read more: |
|
Friday, 22 October 2010 04:00 |
 | About Randommite
A powerful data set generator. Within moments, it enables you to generate large amounts of realistic user-defined data with complete control over the type, range, amount and format. Randommite’s power and flexibility saves time and money; it pays for itself on the very first day of use — especially if you utilize costly consultants.
With ease, Randommite can output records in a variety of modern and legacy formats: XML, SQL, Fixed, HTML, CSV, Grids, Variable, and Custom user-defined formats.
Out of the box, Randommite supplies the following field types for building output records:
- Numbers (defined range of integer, decimal, hexadecimal, octal, or binary)
- Statistical (supply a mean and standard deviation)
- Alphanumeric (names, addresses, dates, text, characters, and more)
- Sequences (define a start and incremental value)
- Literals (static text where you need it)
- Built-In Value Lists (50+ data lists and growing)
- Custom Value Lists (ultimate versatility, define reusable lists containing thousands of values)
- Many more features |
Read more: |
|
|
|
|
|
|
|