?php the_time('F, Y');?>
Sunday, February 24th, 2008
1.
string gethostbyaddr ( string $ip_address )
Returns the host name of the Internet host specified by ip_address.
2.
string gethostbyname ( string $hostname )
Returns the IP address of the Internet host specified by hostname.
3.
array gethostbynamel ( string $hostname )
Returns a list of IP addresses to which the Internet ...
Posted in Networks, PHP | No Comments »
Saturday, February 23rd, 2008
Verifying credit cards in c# is very easy. The last digit of a credit card is a check digit, which is used to check if the card is valid or not. It prevents the keystroke errors when a check card number is entered.
In this article you will learn about check ...
Posted in C#, Credit Cards, Security | No Comments »
Saturday, February 23rd, 2008
Tired of looking for unregistered domain name? Use this generator written in C# to find available domains, ready to register:
using System;
using System.Text;
using System.Net;
class Domains
{
static Random r = new Random();
static void Main()
{
...
Posted in C#, Domains | No Comments »
Tuesday, February 19th, 2008
Getting extension of the file using explode() function
function getFileExtension($fileName)
{
$parts=explode(”.”,$fileName);
return $parts[count($parts)-1];
}
Getting file name using basename() function
echo basename(’/var/website/htdocs/test.php‘); // output test.php
echo basename(’/var/website/htdocs/test.php‘,’.php‘); // output test
Getting extension of the file using ...
Posted in PHP | No Comments »
Tuesday, February 19th, 2008
1. Make up fake acronyms. Online veterans like to use abbreviations like IMHO (in my humble opinion) or RTFM (read the fucking manual) to show that they're "hep" to the lingo. Make up your own that don't stand for anything (SETO, BARL, CP30), use them liberally, and then refuse to ...
Posted in Humor | 4 Comments »
Sunday, February 17th, 2008
Adobe - came from name of the river Adobe Creek that ran behind the house of founder John Warnock.
Apache - It got its name because its founders got started by applying patches to code written for NCSA's httpd daemon. The result was 'A PAtCHy' server. Thus, the name Apache
Apple Computers ...
Posted in Uncategorized | No Comments »
Saturday, February 16th, 2008
SQL Injection is a term for injecting SQL command or query in the address query or as a input in the form of the POST or GET method in the web pages.
For example:
You have a database of different products, with primary key product_id. To get a product info from database, ...
Posted in PHP, Security, Sql | No Comments »
Friday, February 15th, 2008
Today, I'd like to show you, a simple method, which validates american phone numbers.
American phone numbers have the format of 'XXX-XXX-XXXX'
function ValidatePhoneNumber($number)
{
if ( ereg(’^[2-9]{1}[0-9]{2}-[0-9]{3}-[0-9]{4}$’, $number) )
return true;
else
return false;
}
Hope it helps :)
Posted in PHP | 2 Comments »
Tuesday, February 12th, 2008
The following code allows you to limit the speed of downloading files from your server.
// file to download
$filename = 'file-to-download.zip';
// filename visible for client
$visible_name = 'client-file-name.zip';
// setting the download rate limit (=> 36,6 kb/s)
$download_rate = 36.6;
// checking if file exists
if(file_exists($filename) && is_file($filename)) {
...
Posted in PHP | No Comments »
Saturday, February 9th, 2008
The best way to generate a unique key is to use System.Guid. The only problem with that is, that it generates string representations, which are 36 characters long. In many cases it is an issue, for example when using it in urls.
The standard GUID representation looks like this:
ae5e6a80-a9e9-4102-a1dd-25697336695e
And it's generated ...
Posted in C# | No Comments »