• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Looking for script asap

Cheffy

New Member
Hello all,
I am looking for script like www.afraid.org where poeple can make there own domains name.
But i dont wanne have that people can park there domains it is only to pick subdomains and have dns controle of that (sub)domain name that is.
But i have look araound every where hotscript , google you name it but i cant find nothing at all.
Is there a script around like this (free or payed) ???

Many thanks for reply to help me out :beer:
 
I believe many of them are custom.

I will try to help you find one though.
 
Last edited:
I have looked all over ;) I too cannot find anything like the said script. If you want one, it means alot of coding is going to be needed ;)
 
PHP:
<?
class named
{
	function named( $dblocation )
	{
		if( !is_dir( $dblocation ) )
		{
			die( sprintf( "Cannot open %s\r\n", $dblocation ) );
		}	
		$this->db = $dblocation ;
		 
	}
	function read( $hostname )
	{
	 	$named = new stdClass ;
	 	
		if( !file_exists( sprintf('%s/%s.db', $this->db, $hostname ) ) )
		{
			die( sprintf( "Cannot open %s named configuration for reading\r\n", $hostname ) );	
		}		
		foreach( array_values( file( sprintf('%s/%s.db', $this->db, $hostname ) ) ) as $line )
		{
			if( $line != "" and preg_match( sprintf('~^%s\.~', $hostname ), trim( $line ) ) )
			{
				if( preg_match( sprintf( '~%s\. [0-9]+ IN NS ([a-zA-Z0-9\.-]+)~', $hostname ), trim( $line ), $ns ) and $ns[1] ) 
				{
					$named->ns[ count( $named->ns ) + 1 ] = trim( preg_replace( '~\.$~', '', $ns[1] ) );
				}
				elseif( preg_match( sprintf( '~%s\. IN A ([0-9\.]+)~', $hostname ), trim( $line ), $a ) and $a[1] )
				{
					$named->a = trim( $a[1] );
				}
				elseif( preg_match( sprintf( '~%s\. IN MX ([0-9]+) ([a-zA-Z0-9\.-]+)\.~', $hostname ), trim( $line ), $mx ) and count( $mx ) == 3 )
				{
				 	$record = count( $named->mx ) + 1 ;
				 	$named->mx[ $record ]['preference'] = trim( $mx[1] );
				 	$named->mx[ $record ]['address'] = trim( $mx[2] );
				}
				// elseif( the rest of the things you want them to control, cant be bothered to do it, but its real easy to do )	
			}
		}
		return $named ;
	}	
	function write( $form )
	{
		// use form data to load the config file, and write some sort of parser to replace old with new values, not hard 
	}
	function restart( )
	{
		// return system binary needed to restart named, can be done
	}
}
$dns = new named( '/var/named' );
print_r( $dns->read( 'krakjoe.com' ) );

?>

Code:
stdClass Object
(
    [ns] => Array
        (
            [1] => one.hozter.info
            [2] => two.hozter.info
        )

    [a] => 38.114.204.59
    [mx] => Array
        (
            [1] => Array
                (
                    [preference] => 0
                    [address] => krakjoe.com
                )

        )

)

I could finish, but I got bored, and I dunno if you still need it ......
 
Back
Top