Results 1 to 3 of 3

Thread: Creating subdomains in PHP

  1. #1
    Junior Member
    Join Date
    Mar 2004
    Posts
    26

    Default Creating subdomains in PHP

    Hello everyone,

    How would I create subdomains in PHP?

    Specifically, I currently have URLs that look like this www.domain.com/page.php?ID=4
    www.domain.com/page.php?ID=3

    etc...

    I would like to create subdomains using PHP (for when I add new records) so that the subdomain points to the url.

    For example: s3.domain.com would be the equivalent of www.domain.com/page.php?ID=3

    Is this possible?

    Dan.

  2. #2
    Junior Member
    Join Date
    Mar 2004
    Posts
    26

    Default

    If this isn't possible, is it possible to at least use PHP to create subdomains that point to subfolders?

    Dan.

  3. #3
    Senior Member
    Join Date
    Mar 2004
    Location
    Australia
    Posts
    183

    Default

    It should be possible to use cURL to simulate a login into your cpanel account, then create the subdomain(s) from there.

    There are scripts that do this for email forwarders, so I would assume it wouldn't be too difficult to do the same for subdomains.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •