Jump to content

New Enom Name Spinner


Recommended Posts

  • Replies 174
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

It depends on which domain page you're speaking of. Currently the namespinner only works on the "Register Domain" page in the cart.

 

There's been some requests to get this working on the bulk domain checker, and I'm looking into what needs to be done to get it working on that page.

 

If you're having problems on the page in the cart, please make sure you read the install instructions included with the zip file. Then you could set the app to debug mode and hopefully get some extra info to figure out why it's not working for you.

Link to comment
Share on other sites

It depends on which domain page you're speaking of. Currently the namespinner only works on the "Register Domain" page in the cart.

 

There's been some requests to get this working on the bulk domain checker, and I'm looking into what needs to be done to get it working on that page.

 

If you're having problems on the page in the cart, please make sure you read the install instructions included with the zip file. Then you could set the app to debug mode and hopefully get some extra info to figure out why it's not working for you.

 

Why dont you try yourself:

 

http://www.unixielhost.net/accounts/ and play around see what I mean when you reach the register domain page

Link to comment
Share on other sites

I am using WHMCS v4.0.1

 

Hi, there are install instructions included with the download.. Also available in the script is a debug mode variable which you can set to true to see the XML response generated from Enom.

 

I would at least need this information to figure out what's going on for you.

Link to comment
Share on other sites

I have just published version 1.3 which adds the option of displaying the name spinner on the bulk domain checker page (domaincheck.php).

 

Download is now available at : http://ideamesh.com/file/10/WHMCS-ENOM-NameSpinner-v13.html

 

This also work's in V3.+ with a bit of changing:

 

{if $domain neq "transfer"}
{php}
	/**
	 * @version 1.11
	 * @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 these to your actual enom username and password
	$enomid = "enomid";
	$enompw = "enompw";

	//Max number of spins to generate
	$maxspins = 20;

	//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 = true;
	$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);

	//Check for domainchecker.php vs cart
	if ($filename == 'domainchecker') {
		$tld = $ext;
		$sld = $domain;
		$this->assign('outputplace', 'domainchecker');
	} else {
		$this->assign('outputplace', 'cart');
	}

	//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);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
	//curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
	$xml = curl_exec($ch);
	$curlerror = "ErrNo: ".curl_errno($ch)." ErrMsg: ".curl_error($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 {
			if ($debug) echo $spinnerresults->errors->Err1;
			$gotnamespinner = false;
		}
	} else {
		if ($debug) echo "Cannot retrieve XML file. Please check your firewall settings.<br>".$curlerror;
		$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 && $outputplace == 'cart'}
	<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>
{elseif $outputplace == 'domainchecker'}
	<p><strong>We also recommend</strong></p>
		<table class="clientareatable" cellspacing="1">
		<tr class="clientareatableheading">
			<td width="20"></td><td>{$LANG.domainname}</td><td>{$LANG.domainstatus}</td><td>{$LANG.domainmoreinfo}</td></tr>
			{foreach key=num item=result from=$spinner}
				<tr class="clientareatableactive">
					<td><input type="checkbox" name="domains[]" value="{$result.domain}"/>
						<input type="hidden" name="domainsregperiod[{$result.domain}]" value="{$result.period}" />
					</td>
					<td>{$result.domain}</td>
					<td class="textgreen">{$LANG.domainavailable}</td>
					<td>
						<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} @ {$currency.prefix}{$regoption} {$currency.code}</option>
						{/foreach}
						</select>
					</td>
				</tr>
			{/foreach}
	</table>
	<p align="center"><input type="submit" value="{$LANG.ordernowbutton} >>" /></p>
{/if}
{/if}

 

Thanks

Link to comment
Share on other sites

Using WHMCS 4.0.1 and version 1.3 of your software, we are not getting

anything in the "We also recommend" section.

 

This seemed to quit working after we added .us to our domain configuration within

WHMCS, and so we removed .us and only have .com, .net, and .org configured and

still no results, except the header for the "We also recommend" section displays.

 

Here is the debug info.

 

 

<?xml version="1.0"?>

<interface-response>

<namespin>

<spincount>20</spincount>

<TLDList ></TLDList >

<domains>

<domain name="ventfragtwo" com="n" comscore="852" net="n" netscore="825" tv="y" tvscore="798" cc="y" ccscore="772" />

<domain name="ventfweek2" com="n" comscore="839" net="n" netscore="812" tv="y" tvscore="785" cc="y" ccscore="759" />

<domain name="airfrag2" com="n" comscore="826" net="n" netscore="799" tv="y" tvscore="772" cc="y" ccscore="746" />

<domain name="ventfragto" com="n" comscore="813" net="n" netscore="786" tv="y" tvscore="759" cc="y" ccscore="733" />

<domain name="ventfpaper2" com="n" comscore="800" net="n" netscore="773" tv="y" tvscore="746" cc="y" ccscore="720" />

<domain name="ventilatefrag2" com="n" comscore="786" net="n" netscore="760" tv="y" tvscore="733" cc="y" ccscore="707" />

<domain name="ventfragpair" com="n" comscore="773" net="n" netscore="747" tv="y" tvscore="720" cc="y" ccscore="694" />

<domain name="ventfdun2" com="n" comscore="760" net="n" netscore="734" tv="y" tvscore="707" cc="y" ccscore="681" />

<domain name="airoutfrag2" com="n" comscore="747" net="n" netscore="721" tv="y" tvscore="694" cc="y" ccscore="667" />

<domain name="ventfweektwo" com="n" comscore="734" net="n" netscore="708" tv="y" tvscore="681" cc="y" ccscore="654" />

<domain name="lockheedfrag2" com="n" comscore="732" net="n" netscore="705" tv="y" tvscore="678" cc="y" ccscore="652" />

<domain name="myventfrag2" com="n" comscore="732" net="n" netscore="705" tv="y" tvscore="678" cc="y" ccscore="652" />

<domain name="theventfrag2" com="n" comscore="732" net="n" netscore="705" tv="y" tvscore="678" cc="y" ccscore="652" />

<domain name="ventfrag2online" com="n" comscore="732" net="n" netscore="705" tv="y" tvscore="678" cc="y" ccscore="652" />

<domain name="webventfrag2" com="n" comscore="732" net="n" netscore="705" tv="y" tvscore="678" cc="y" ccscore="652" />

<domain name="airfragtwo" com="n" comscore="721" net="n" netscore="695" tv="y" tvscore="668" cc="y" ccscore="641" />

<domain name="fighterfrag2" com="n" comscore="714" net="n" netscore="687" tv="y" tvscore="661" cc="y" ccscore="634" />

<domain name="lockheed" com="n" comscore="714" net="n" netscore="687" tv="y" tvscore="661" cc="y" ccscore="634" />

<domain name="airfweek2" com="n" comscore="708" net="n" netscore="682" tv="y" tvscore="655" cc="y" ccscore="628" />

<domain name="lockheedventfrag2" com="n" comscore="696" net="n" netscore="670" tv="y" tvscore="643" cc="y" ccscore="616" />

</domains>

</namespin>

<originalsld>ventfrag2</originalsld>

<Command>NAMESPINNER</Command>

<Language>eng</Language>

<ErrCount>0</ErrCount>

<ResponseCount>0</ResponseCount>

<MinPeriod>0</MinPeriod>

<MaxPeriod>0</MaxPeriod>

<Server>sjl01wresell14</Server>

<Site>eNom</Site>

<IsLockable>False</IsLockable>

<IsRealTimeTLD>False</IsRealTimeTLD>

<TimeDifference>+0.00</TimeDifference>

<ExecTime>0.469</ExecTime>

<Done>true</Done>

<debug></debug>

<TrackingKey>d71b5b73-1c2d-4c4e-9a37-001a02603fd6</TrackingKey>

</interface-response>

Link to comment
Share on other sites

It looks like it's retrieving the information correctly. Which TLD's you have configured shouldn't have an effect on whether or not this works..

 

You might be having an issue because you don't sell .tv or .cc TLD's and the script is trying to pull prices for those.. Did you make sure that you set these two variables to false?

 

		$showdotcc = false;
	$showdottv = false;

Link to comment
Share on other sites

I have this script working and very well, thank you very much webworker.

 

My question. In your file it says "//Enom only will return .com, .net, .cc and .tv results that's why these were chosen"

 

So if that is the case, what is usadomains doing.

The reason I ask is because I would really like to have .mobi displayed for example, because along with .mobi, .info. and .tv they are all currently on special with Enom

 

I have tried to enter the .mobi as an option instead .tv but I get no result at all. The .com and .net still work.

So did I do something wrong or can you only get spins on the those 4 TLD's?

 

 

Thank you

Link to comment
Share on other sites

//Enom only will return .com, .net, .cc and .tv results

 

I have tried to enter the .mobi as an option instead .tv but I get no result at all

 

So did I do something wrong or can you only get spins on the those 4 TLD's?

 

Enom only return "alternative" suggestions for com/net/cc/tv

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • 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