Hello Community,
I am using a script (will provide), which I am using for the Tips and Tricks portion of the website. I have a slight dilemna because it is not acting in the way I need it to and I have fiddled with it and still no luck :( .
Problem: I have a form set up where you input the domain name such as "hybridmed" and then from a dropdown menu select the dot extension such as ".net". Now the form works with the script but it makes you input the whole domain name "hybridmed.net" and completely disregards the dropdown menu. So if you could help me incorporate that so it functions properly that would be great.
Form Code:
/<form method="post" action="http://www.hostventura.com">
<input type="text" name="Domain" value="Your Domain" size="20" class="small">
<select name="select" class="small">
<option>.com</option>
<option>.net</option>
<option>.org</option>
<option>.biz</option>
<option>.info</option>
<option>.us</option>
</select>
<input name="submit" type="submit" value="Check Domain" class="small">
</form>
/
Problem #2: My form is located in the sidebar, and the script causes it to display the whois information underneath the sidebar, and it also displays information before you even do a search, this information looks something like this "Whois Server Version 1.3 Domain names in the .com and .net domains can now be registered with many different competing registrars. Go to http://www.internic.net for detailed information. Select a sub-topic for help; '?' (with no RETURN) for a list of options; RETURN key to return to WHOIS. WHOIS is used to look up records in the registry database. Whois can provide information about domains, nameservers, and registrars. Enter a string to search the database. By default, WHOIS performs a very broad search, looking in all record types for matches to your query in these fields: domain name, nameserver name, nameserver IP address, and registrar names. Use keywords to narrow the search (for example, 'domain root'). WHOIS displays the results in one of two ways: as a full, detailed display one--line summaries for single/multiple matches. Often, the search finds more records than just the one wanted. Specify both type and full name to look up a specific record (for example, 'domain ibm.com'). Specify only part of the search string to perform a "partial" search on domain. Every domain STARTING with the string will be found. A trailing dot (or dots) after your text or the PArtial keyword indicates a partial search. For example, entering 'mack.' will find "Mack", "Mackall", "Mackay", and so on." etc. I need to get rid of that text, I know it is possible because I see several hosting sites without it all the time.
I would also like to make the WHOIS information after you hit the Search or Submit button to pop-up in a small window if at all possible, rather than appearing in the sidebar and distorting the page.
PHP Code (Found in TIps section of PHPBuilder.com)
<?php
function get_whois($server,$domain,&$output)
{
$whois = fsockopen($server, 43);
fputs($whois, "$domain\r\n");
$result = "";
while(!feof($whois))
{
$str = fgets($whois, 1024);
$result .= $str;
if (strstr($str, "Whois Server:"))
{
$new_server = split(": ", $str);
$output = chop("$new_server[1]");
fclose($whois);
return(1);
}
}
$output = $result;
fclose($whois);
return(0);
}
$output = "";
// look up a domain name at rs.internic.net
$redirect = get_whois("rs.internic.net", $Domain, $output);
// if rs.internic.net doesn't have the information, $output will give us the
// server that does, so use it to get the registration info
while ($redirect)
{
$whois_server = $output;
$redirect = get_whois($whois_server, $Domain, $output);
}
// ouput the domain registration information
echo $output;
?>
To View what Happens on the site here is the link.
http://www.hostventura.com
I would like to thank all help I recieve in advance.
EMAIL - taylor@hybridmed.net
AIM: elnino2050@comcast.net
Thanks,
Taylor Leach
Hybrid Media