Jump to content

hotrockhosting

Member
  • Posts

    16
  • Joined

  • Last visited

About hotrockhosting

hotrockhosting's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. comes auto with whmcs 6.0 https://hotrockhosting.com/whmcs/domainchecker.php use template 6 and activate the service under whmcs>settings>>domains in the top right box
  2. Thanks Ideamesh, I did it. I also replaced the login credentials with external php file... just formats off and some of the fields not showing yet like price of suggested domain. https://hotrockhosting.com/whmcs/add/1.html Based on WHMCS Register New Domain under the Default Template and Web20cart Cart You will have to create files: namespinner.tpl and enom.php and just edit adddomain.tpl namespinner.tpl {if $domain neq "transfer"} {php} /** * @version 1.1 * @since WHMCS 3.8 * @copyright 2009 http://ideamesh.com This script is owned and licensed by Ideamesh, Inc. * You may use this script in commercial applications, however you may not resell * this script without permission of Ideamesh, Inc.<br> * Please contact (sales [at] ideamesh [dot] com) for more information */ //Set to true to get debug messages $debug = false; //Edit enom.php to your actual enom username include ("templates/orderforms/web20cart/enom.php"); //Max number of spins to generate $maxspins = 50; //Choose which options to show in the spin results //Enom only will return .com, .net, .cc and .tv results that's why these were chosen $showdotcom = true; $showdotnet = false; $showdotcc = false; $showdottv = false; //Can be one of these values ("tld"|"sld"|"score") $sort1 = "score"; $sort2 = "sld"; //Can be one of these values (SORT_ASC|SORT_DESC) $sort1order = SORT_DESC; $sort2order = SORT_ASC; //Set this to "True" for blocking sensitive content or "False" to allow sensitive content $sensitivecontent = "True"; // Extract Smarty variables extract($this->_tpl_vars); //Do not edit this. We're setting up the URL to retrieve the spins $namespinnerurl = "https://reseller.enom.com/interface.asp?command=namespinner&uid=".$enomid."&pw=".$enompw."&SLD=".$sld."&TLD=".$tld."&SensitiveContent=".$sensitivecontent."&MaxResults=".$maxspins."&ResponseType=XML"; // Use cURL to get the XML response $ch = curl_init($namespinnerurl); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $xml = curl_exec($ch); curl_close($ch); if ($xml) { $spinnerresults = new SimpleXmlElement($xml, LIBXML_NOCDATA); if ($spinnerresults->ErrCount == 0) { for ($i=0; $i< $maxspins; $i++) { if ($showdotcom && (string)$spinnerresults->namespin->domains->domain[$i]['com'] == "y") $spinner[] = array( 'domain' => (string)$spinnerresults->namespin->domains->domain[$i]['name'].".com", 'netscore' => (int)$spinnerresults->namespin->domains->domain[$i]['comscore'], 'tld' => '.com'); if ($showdotnet && (string)$spinnerresults->namespin->domains->domain[$i]['net'] == "y") $spinner[] = array( 'domain' => (string)$spinnerresults->namespin->domains->domain[$i]['name'].".net", 'netscore' => (int)$spinnerresults->namespin->domains->domain[$i]['netscore'], 'tld' => '.net'); if ($showdotcc && (string)$spinnerresults->namespin->domains->domain[$i]['cc'] == "y") $spinner[] = array( 'domain' => (string)$spinnerresults->namespin->domains->domain[$i]['name'].".cc", 'netscore' => (int)$spinnerresults->namespin->domains->domain[$i]['ccscore'], 'tld' => '.cc'); if ($showdottv && (string)$spinnerresults->namespin->domains->domain[$i]['tv'] == "y") $spinner[] = array( 'domain' => (string)$spinnerresults->namespin->domains->domain[$i]['name'].".tv", 'netscore' => (int)$spinnerresults->namespin->domains->domain[$i]['tvscore'], 'tld' => '.tv'); } $gotnamespinner = true; } else { $gotnamespinner = false; } } else { if ($debug) echo "Cannot retrieve XML file. Please check your firewall settings"; $gotnamespinner = false; } if ($debug) { echo "<pre>"; echo htmlentities($xml); echo "</pre>"; } //Get domain pricing for .com, .net, .cc and .tv if ($gotnamespinner) { $sql = "SELECT extension, register, registrationperiod FROM tbldomainpricing WHERE extension in ('.com', '.net', '.cc', '.tv');"; $query = mysql_query ($sql); while ($row = @mysql_fetch_array ($query, MYSQL_ASSOC)) { $domainprices[$row['extension']][$row['registrationperiod']] = $row['register']; } } // Setup for the sorting foreach ($spinner as $key => $row) { $spin['sld'][$key] = $row['domain']; $spin['score'][$key] = $row['netscore']; $spin['tld'][$key] = $row['tld']; } array_multisort($spin[$sort1], $sort1order, $spin[$sort2], $sort2order, $spinner); //Send some variables back to the template $this->assign('spinner', $spinner); $this->assign('gotnamespinner', $gotnamespinner); $this->assign('domainprices', $domainprices); {/php} {if $gotnamespinner} <p class="cartsubheading">We also recommend</p> <table class="clientareatable" style="width:90%;" align="center" cellspacing="1"> <tr class="clientareatableheading"><td>{$LANG.domainname}</td><td>{$LANG.domainstatus}</td><td>{$LANG.domainmoreinfo}</td></tr> {foreach key=num item=result from=$spinner} <tr class="clientareatableactive"> <td width="33%">{$result.domain}</td> <td width="33%" class="domaincheckeravailable"><input type="checkbox" name="domains[]" value="{$result.domain|lower}"{if $result.domain|lower|in_array:$domains} checked{/if} /> {$LANG.domainavailable}</td> <td width="33%"><select name="domainsregperiod[{$result.domain|lower}]"> {assign var=thistld value=$result.tld} {foreach key=years item=regoption from=$domainprices.$thistld} <option value="{$years}">{$years} {$LANG.orderyears} @ {$currencysymbol}{$regoption} {$currency}</option> {/foreach}</select> </td> </tr> {/foreach} </table> <p align="center"><input type="submit" value="{$LANG.addtocart}" /></p> {/if} {/if} enom.php <?php $enomid = "enomid"; $enompw = "enompw"; ?> adddomain.tpl add code before last form tag as instructed. {include file="orderforms/web20cart/namespinner.tpl"} still working on domainchecker
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated