Jump to content

API code for new order and client login


Recommended Posts

Hello

 

I need to customize order page for my site. Can Some one give me code for order and client login.

 

My developer is on leave. I can not wait until he returns from leave..

 

I tried to use below code for login but its not working

 

<?php

 

$url = "http://www.domain.com/whmcs/includes/api.php"; # URL to WHMCS API file

$username = "Admin"; # Admin username goes here

$password = "whmcs_password"; # Admin password goes here

 

$command = "validatelogin";

$postfields["action"] = "validatelogin";

$postfields["email"] = "xyz@plantest.com";

$postfields["password2"] = "Zaq12345";

 

 

$data = explode(";",$data);

foreach ($data AS $temp) {

$temp = explode("=",$temp);

$results[$temp[0]] = $temp[1];

}

 

if ($results["result"]=="success") {

# Result was OK!

} else {

# An error occured

echo "The following error occured: ".$results["message"];

}

 

?>

 

Sorry I don't have much knowledge about php , did I used correct code ?

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