GIrish BM Posted December 22, 2009 Share Posted December 22, 2009 Hi I am PHP PROGRAMMER But stucked in domain search problem fro four days plz help me to complete this task so that it will be help full to me.........the code which i was writtent is working like this ex:- john is the domain name given in the search box it will show 50% correct results i mean if .org is taken thn also it will show not registered so my code is showm below <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <link rel="stylesheet" href="css/style.css" type="text/css" /> <html><title>PBMInfotech-Domain Search</title> <body> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="domain"> <table bgcolor="#E6E6E6"> <tr><td align="center"> Domain name:<input name="domainname" id="dn1" type="text"/></td></tr> <tr> <td bgcolor="#FFFFFF"><img src="images/line.jpg" height="1px;" width="1px;" /></td> </tr> <tr><td><input type="checkbox" name="com[]" value='com' checked="checked"/>.com <input type="checkbox" name="com[]" value='org' checked="checked"/>.org <input type="checkbox" name="com[]" value= 'net' />.net <input type="checkbox" name="com[]" value= 'biz' />.biz <input type="checkbox" name="com[]" value= 'pro' />.pro <input type="checkbox" name="com[]" value= 'ru.com' />.ru.com </td></tr> <tr> <td><input type="checkbox" name="com[]" value='me' />.me <input type="checkbox" name="com[]" value='name' />.name <input type="checkbox" name="com[]" value= 'info' />.info <input type="checkbox" name="com[]" value= 'de' />.de <input type="checkbox" name="com[]" value= 'fm' />.fm <input type="checkbox" name="com[]" value= 'us.com' />.us.com </td> </tr> <tr> <td><input type="checkbox" name="com[]" value='bz' />.bz <input type="checkbox" name="com[]" value='mobi' />.mobi <input type="checkbox" name="com[]" value= 'cc' />.cc <input type="checkbox" name="com[]" value= 'gs' />.gs <input type="checkbox" name="com[]" value= 'tel' />.tel <input type="checkbox" name="com[]" value= 'uk.com' />.uk.com </td> </tr> <tr> <td> <input type="checkbox" name="com[]" value= 'uk.com' />.uk.com <input type="checkbox" name="com[]" value= 'eu.com' />.eu.com <input type="checkbox" name="com[]" value= 'edu' />.edu <input type="checkbox" name="com[]" value= 'co.in' />.co.in </td> </tr> <tr bgcolor="#FFFFFF" align="center"><td><input type="submit" name="submitBtn" value="Check domain"/></td></tr> </table> </form> <?php // The form was submitted if (isset($_POST['submitBtn'])){ $domainbase = (isset($_POST['domainname'])) ? $_POST['domainname'] : ''; //$d_com = (is_array($_POST['com'])); //just get the $arr = $_POST['com']; $v1 =count($arr); if(($v1 =='0') || ($v1 >= '1')){ $arr =array('com','org','net','biz','pro','ru','me','name','info','de','fm','us.com','bz','mobi','cc','gs','tel','uk.com','edu','co.in'); } // echo '<pre>'; print_r($arr); echo '</pre>' ; ?> <br /> <tr class="main_tbl"> <?php echo 'The Following Result Shows The Domain Avaliable For You Doamin Name :'.'<span class=domainName>'.$_POST['domainname'].'</span>'.'<p>'; foreach($arr as $var => $val) { ?> <td> <?php if (checkdnsrr($domainbase.'.'.$val, "MX")) { $temp1 =$domainbase . '.' . $val .'<br>'; echo '<div class=taken_style>'.'<span class=tahoma_normal>'.'Taken'.' '.'.'.$val.'</span>'.'</div>'; } else { ?> </td> <td> <?php $temp2 =$domainbase . '.' . $val .'<br>'; echo '<div class=avaliable_style>'.'<span class=tahoma_normal>'.'<input type=checkbox>'.'.'.$val.'</span>'.'</div>'; } ?> </td> </tr> <?php } ?> <?php } ?> </body> Link to comment https://forums.phpfreaks.com/topic/185999-php-domain-search/ Share on other sites More sharing options...
vinpkl Posted December 22, 2009 Share Posted December 22, 2009 post your code in tags vineet Link to comment https://forums.phpfreaks.com/topic/185999-php-domain-search/#findComment-982189 Share on other sites More sharing options...
GIrish BM Posted December 23, 2009 Author Share Posted December 23, 2009 post your code in tags vineet Hi Vineet i didnt get u wt u r telling plz be clear to me Link to comment https://forums.phpfreaks.com/topic/185999-php-domain-search/#findComment-982875 Share on other sites More sharing options...
trq Posted December 23, 2009 Share Posted December 23, 2009 What exactly is the problem? And please, if your going to post code, place it within tags. Link to comment https://forums.phpfreaks.com/topic/185999-php-domain-search/#findComment-982941 Share on other sites More sharing options...
fbemo Posted December 23, 2009 Share Posted December 23, 2009 Like this, Just to help. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <link rel="stylesheet" href="css/style.css" type="text/css" /> <html><title>PBMInfotech-Domain Search</title> <body> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="domain"> <table bgcolor="#E6E6E6"> <tr><td align="center"> Domain name:<input name="domainname" id="dn1" type="text"/></td></tr> <tr> <td bgcolor="#FFFFFF"><img src="images/line.jpg" height="1px;" width="1px;" /></td> </tr> <tr><td><input type="checkbox" name="com[]" value='com' checked="checked"/>.com <input type="checkbox" name="com[]" value='org' checked="checked"/>.org <input type="checkbox" name="com[]" value= 'net' />.net <input type="checkbox" name="com[]" value= 'biz' />.biz <input type="checkbox" name="com[]" value= 'pro' />.pro <input type="checkbox" name="com[]" value= 'ru.com' />.ru.com </td></tr> <tr> <td><input type="checkbox" name="com[]" value='me' />.me <input type="checkbox" name="com[]" value='name' />.name <input type="checkbox" name="com[]" value= 'info' />.info <input type="checkbox" name="com[]" value= 'de' />.de <input type="checkbox" name="com[]" value= 'fm' />.fm <input type="checkbox" name="com[]" value= 'us.com' />.us.com </td> </tr> <tr> <td><input type="checkbox" name="com[]" value='bz' />.bz <input type="checkbox" name="com[]" value='mobi' />.mobi <input type="checkbox" name="com[]" value= 'cc' />.cc <input type="checkbox" name="com[]" value= 'gs' />.gs <input type="checkbox" name="com[]" value= 'tel' />.tel <input type="checkbox" name="com[]" value= 'uk.com' />.uk.com </td> </tr> <tr> <td> <input type="checkbox" name="com[]" value= 'uk.com' />.uk.com <input type="checkbox" name="com[]" value= 'eu.com' />.eu.com <input type="checkbox" name="com[]" value= 'edu' />.edu <input type="checkbox" name="com[]" value= 'co.in' />.co.in </td> </tr> <tr bgcolor="#FFFFFF" align="center"><td><input type="submit" name="submitBtn" value="Check domain"/></td></tr> </table> </form> <?php // The form was submitted if (isset($_POST['submitBtn'])){ $domainbase = (isset($_POST['domainname'])) ? $_POST['domainname'] : ''; //$d_com = (is_array($_POST['com'])); //just get the $arr = $_POST['com']; $v1 =count($arr); if(($v1 =='0') || ($v1 >= '1')){ $arr =array('com','org','net','biz','pro','ru','me','name','info','de','fm','us.com','bz','mobi','cc','gs','tel','uk.com','edu','co.in'); } // echo '<pre>'; print_r($arr); echo '</pre>' ; ?> <br /> <tr class="main_tbl"> <?php echo 'The Following Result Shows The Domain Avaliable For You Doamin Name :'.'<span class=domainName>'.$_POST['domainname'].'</span>'.'<p>'; foreach($arr as $var => $val) { ?> <td> <?php if (checkdnsrr($domainbase.'.'.$val, "MX")) { $temp1 =$domainbase . '.' . $val .'<br>'; echo '<div class=taken_style>'.'<span class=tahoma_normal>'.'Taken'.' '.'.'.$val.'</span>'.'</div>'; } else { ?> </td> <td> <?php $temp2 =$domainbase . '.' . $val .'<br>'; echo '<div class=avaliable_style>'.'<span class=tahoma_normal>'.'<input type=checkbox>'.'.'.$val.'</span>'.'</div>'; } ?> </td> </tr> <?php } ?> <?php } ?> </body> Link to comment https://forums.phpfreaks.com/topic/185999-php-domain-search/#findComment-982997 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.