Wildcard DNS and PHP

I’ve always been wondering how it works, and I’ve finally found out how it does. I will give a few simple examples how it works and how you can use it.

Step one : Make sure your server/domain allows wildcard DNS and that it is enabled on your server/domain.

Step two : Lets create a file called index.php

now before I continue with step 3, it is nice to know that the wildcard subdomain forwards to the index.php on the main domain so all the following domain pont to the same file.

  • foo.domain.com
  • bar.domain.com
  • foobar.domain.com

Read the rest of this article

Tags: , , ,

Passing form data with AJAX

Some time ago I’ve tried to pass form data with AJAX without using any framework. my jQuery or Mootools. They are great scripts but in most of my cases they over-do the job, so therefor I’ve tried to do it myself, at first I managed to send the post data BUT the format was wrong. anyway to make a long story short here is how I did it.

Read the rest of this article

Tags: , ,