Jump to content

Eliav

Retired Forum Member
  • Posts

    6
  • Joined

  • Last visited

About Eliav

Eliav's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. I would like to see this as well please Right now I have to manually purchase the SSL certificate (created a custom field for the CSR and server type). I would love to see it all automated...
  2. Hey guys, I'm working on a script that would require the user to enter their username and password (for verification) and I was hoping to just compare the encrypted password and username to the database but for some reason, whenever I test the encryption, it gives a different string for the same text every time the page is refreshed (If that makes sense). I'm just starting on the code so its still pretty much the regular API. <?php $url = "http://MYDOMAIN/includes/api.php"; # URL to WHMCS API file $postfields["username"] = "MYADMIN"; $postfields["password"] = "MYMD5PASS"; $postfields["action"] = "encryptpassword"; $postfields["password2"] = "atestpass"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 100); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); $data = curl_exec($ch); curl_close($ch); $data = explode(";",$data); foreach ($data AS $temp) { $temp = explode("=",$temp); $results[$temp[0]] = $temp[1]; } if ($results["result"]=="success") { # Result was OK! echo $results["password"]; } else { # An error occured echo "The following error occured: ".$results["message"]; } ?> When I view the page, it would sometimes end up being something like B5LlHyPmXXbAF3LmUU5WyO0aAqaaPU7Rg8Jab4G but if I refresh again (with the same exact code) it would be something completely different... Ideas? Or was that the way it was built to be? I basically need to verify that the user is really the user they say they are (which is why I am having them login again) and not a hacker. I cant use the session logged in status because the file will be hosted on an another server (separate from my whmcs domain). Otherwise I could easily do it Thanks! -Eliav
  3. Okay, another problem. I need a way to decrypt the server password located in the mysql database (I am adding some server functions that are not yet implemented in WHMCS). I am not sure what API method you use for the servers, so I just used the PHP one on Direct Admin. If you are using the same one, that would make things easier (just let me know how to use your current config). If not, then is there a way I can decrypt my server password to login to the server from my own file? I have everything else worked out the way I need it to, but I just need to get the passwords working (so I dont have to store server passwords in a file and so I dont have to manually edit the file everytime I add a new server). Thanks!
  4. Okay, I figured out how to do what I wanted. Let me know if there is an easier way, but I just used: $id = $clientsdetails['id']; $q1 = mysql_query("SELECT username FROM tblhosting WHERE userid = '$id' "); $r1 = mysql_fetch_array( $q1 ); $username = $r1['username']; That gives me the username of the hosting account of the current user that is logged in. For those who need other variables, you can just change the SELECT statement to what you need or use *.
  5. Hi there, I am looking for a way to get some of the client data in a custom page for my WHMCS install. I currently want a list of all hosting accounts that are a specific type (like id=22 or something). The best thing would be getting the usernames of the client's hosting packages- in an array or something else. I can easily do this in my own mysql query, but I wasn't sure if it did it already, and I also need to get some client data to use for the WHERE section of the mysql query. If I am making no sense at all, let me know and I will try to explain it in another way. Thanks!
  6. My domain checker also does not work- I updated the templates. Also, when I try to order, the checker works fine.... Link: manage.explodehost.com/domainchecker.php
×
×
  • 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