Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 WEB


  Subdomain Configuration

Subdomain ConfigurationA subdomain configuration is very similar to a domain name configuration. The only difference is that the subdomain entry is tied to the corresponding domain name lookup. A request for the subdomain (e.g. http://content.websitegear.com) will be routed to a DNS server containing the DNS information for the parent domain (websitegear.com). Once the DNS record for the subdomain is resolved to a particular IP address, the request is sent to the web server listening on that IP address. The web server can now delegate the request to the particular website based on the subdomai...

13,362 0       SETUP DOMAIN SUBDOMAIN CONFIGURATION


  passing parameters to XMLHttpRequest’s onreadystatechange function

I’ve been smashing my head against this all day – but I finally got something working consistently and reliable, so I better damn well document it. This is as good a place as any, and hopefully it will be useful to others.I needed to make an Ajax call, so I turned to my good friend XMLHttpRequest. One wrinkle was that I needed to pass in a parameter to it… so I tried:var test = "bar";req = new XMLHttpRequest();req.open("GET", myURL, true);req.foo = test;req.onreadystatechange = function() { if (this.readyState != 4) return; if (this.status == 200) { aler...

13,141 1       AJAX JAVASCRIPT XMLHTTPREQUEST PARAMETER ONREADYSTATECHANGE


  Introducing Google JS Test

Google JS Test is a JavaScript unit testing framework that runs on the V8 JavaScript Engine, the same open source project that is responsible for Google Chrome’s super-fast JS execution speed. Google JS Test is used internally by several Google projects, and we’re pleased to announce that it has been released as an open source project.Features of Google JS Test include:Extremely fast startup and execution time, without needing to run a browser.Clean, readable output in the case of both passing and failing tests.An optional browser-based test runner that can simply be re...

2,908 0       JAVASCRIPT GOOGLE OPEN SOURCE TEST TOOL


  Disable directory listings

Preventing directory listings can be very useful if for example, you have a directory containing important '.zip' archive files or to prevent viewing of your image directories. Alternatively it can also be useful to enable directory listings if they are not available on your server, for example if you wish to display directory listings of your important '.zip' files.To prevent directory listings, create a .htaccess file following the main instructions and guidance which includes the following text:IndexIgnore *The above lines tell the Apache Web Server to prevent directory listings of director...

2,439 0       .HTACCESS DISABLE DIRECTORY LISTING INDE


  Using an Image Submit Button within an HTML Web Page Form

If you're using an HTML form on your web site and would like to use an image submit button instead of the boring standard submit button, this HTML code is for you.In order for your form's input box and your image submit button to line up properly, you will need to place it within an HTML table. In addition, unless your image has a transparent background, you will need to set the table background color to the same color as the image background so that it will seamlessly blend together. <FORM METHOD=post ACTION="/cgi-bin/example.cgi"><TABLE BORDER="0" CELLS...

2,681 0       SUBMIT BUTTON IMAGE HTML


  List of Web Safe Fonts

Here is the list of websafe fonts that I use in my own personal web development. Websafe (or "web safe", "safe for the web") fonts are supposedly fonts that are common among all versions of Windows, Mac, Linux, etc. Fonts that you expect everyone viewing your webpage to have. Please contact me if you know of any other web-safe fonts that should be added to this list. These font names are in typical font-family CSS format, in other words (first choice font), (second choice font), (third choice font), etc. I made them that way so you could easily copy and paste them into your...

4,942 0       WEB CSS FONT SAFE FONT FONT LIST FONT FA


  Multiple Constructor in PHP

See code:class MultipleConstructor {private $info = ”;function __construct() {$argv = func_get_args();switch( func_num_args() ){default:case 1:self::__construct1($argv[0]);break;case 2:self::__construct2( $argv[0], $argv[1] );break;}}function __construct1($value) {$this->info = $value;}function __construct2($value, $value2) {$this->info = $value . ” ” . $value2;}function get() {return $this->info;}}$a = new MultipleConstructor(‘Value 1′);echo $a->get();$b = new MultipleConstructor(‘Value 1′, ‘Value 2′);echo $b->get();Viola!!!...

9,236 0       PHP CONSTRUCTOR MULTIPLE CONSTRUCTOR


  PHP Security

1. IntroductionWriting PHP applications is pretty easy. Most people grasp the syntax rather quickly and will within short time be able to produce a script that works using tutorials, references, books, and help forum forums like the one we have here at PHP Freaks. The problem is that most people forget one of the most important aspects that one must consider when writing PHP applications. Many beginners forget the security aspect of PHP. Generally, your users are nice people, they will do as they are told and you will have no problem with these people whatsoever. However, some people...

30,488 0       PHP SECURITY SQL INJECTION XSS CROSS SIT