MovieDomains said:
I love it! This is exactly what I wanted - thank you!
to use it on your site...
1) create a file called "domains.txt" containing the domains you want to list, with each one separated by a comma, newline or other character that can't appear in a domain name.
2) in the page for your site where you want the domains to be listed, just copy and paste the code above. Your server needs to support php (obviously), and you may need to give the page a .php extension so the server processes the php code.
eg. for a working page..., save the code below as "mydomains.php"...
PHP:
<html>
<head>
<title>My Domains</title>
</head>
<body>
<h3>My Domains</h3>
<?php
$domainfile = dirname(__FILE__).'/domains.txt';
$template = '<a target="_blank" href="http://www.sedo.com/search/details.php4?domain={domain}&language=us" style="text-decoration: none; font-weight: 700">{domain}</a><br />';
$dns = join("\n", file($domainfile));
$dns = preg_split('/[^a-z0-9.-]/i', $dns, -1, PREG_SPLIT_NO_EMPTY);
$domains = array();
foreach( $dns as $d ){
$d = strtolower($d);
$dotpos = strpos($d, '.');
if( $dotpos ){
$sld = substr($d, 0, $dotpos);
$tld = substr($d, $dotpos+1);
$domains[$d] = array('domain'=>$d, 'sld'=>$sld, 'tld'=>$tld);
}
}
asort($domains);
foreach( $domains as $d=>$bits){
echo str_replace(array('{domain}', '{sld}', '{tld}'),
array_values($bits), $template);
}
?>
</body>
</html>
The file "domains.txt", containing your domain names needs to be in the same folder as this page.
Here's that script in action
Alternatively, if you won't be updating your site often, just use the
online version and copy and paste the html it generates into your own page wherever you want it (no need to use php yourself that way).
If anyone wants a copy for there own use, download it
here (right click and save as...and change the file extension from .txt to .php).
ps Thanks a lot for all the DNF

- I think you just increased my dnf count by about 25x!
let me know if you need any more help with it.
cheers,
Sam
