Jump to content

Resellerclub balance in admin


flyfish

Recommended Posts

Chris - for enom its :

 

the *simple* method ...

<?php
$enomuser = "user";
$enompassword = "password";

$enomurl = "http://reseller.enom.com/interface.asp?command=GetBalance&uid=$enomuser&pw=$enompassword&paramname=AvailableBalance&responsetype=text";
$enomstr = file_get_contents($enomurl);
$enomstr = substr($enomstr, strpos($enomstr, "AvailableBalance="));
$enomstr2 = substr($enomstr, 0, strpos($enomstr, "Price="));
$enomstr = str_replace("AvailableBalance=", "$", $enomstr2 );
echo "$enomstr";
?>

 

the more complex method ...

<?php
require_once("/home/billing/public_html/dbconnect.php");
require_once("/home/billing/public_html/includes/functions.php");
require_once("/home/billing/public_html/includes/registrarfunctions.php");
require_once("/home/billing/public_html/modules/registrars/enom/enom.php");

$params = getRegistrarConfigOptions("enom");
$postfields["command"] = "GetBalance";
$postfields["uid"] = $params["Username"];
$postfields["pw"] = $params["Password"];
$postfields["responsetype"] = "text";
$postfields["paramname"] = "AvailableBalance";
$querystring = "";
foreach ($postfields AS $k=>$v)
{
       $querystring .= "$k=".urlencode($v)."&";
}

if ($params["TestMode"])
{
       $url = "resellertest.enom.com";
}
else
{
       $url = "reseller.enom.com";
}

$enomurl = "http://".$url."/interface.asp?".$querystring;
$enomstr = file_get_contents($enomurl);
$enomstr = substr($enomstr, strpos($enomstr, "AvailableBalance="));
$enomstr2 = substr($enomstr, 0, strpos($enomstr, "Price="));
$enomstr = str_replace("AvailableBalance=", "$", $enomstr2 );
echo "$enomstr";
?>

 

no idea on the equivalent for the logicbox api though

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

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