Login   Register  
PHP Classes
elePHPant
Icontem

[How-To]

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      cPanel API  >  All threads  >  [How-To]  >  (Un) Subscribe thread alerts  
Subject:[How-To]
Summary:How to make it work
Messages:6
Author:Richi Gnz
Date:2008-11-29 20:01:14
Update:2009-05-09 21:58:08
 

  1. [How-To]   Reply  
Picture of Richi Gnz
Richi Gnz
2008-11-29 20:01:14
Hi,

Sorry for the stupid question, but I need to know how to get it working. I only want to list current E-mail accounts. If you are gonna tell me where i have to put cPanel details, write this:

$cpuser = "heretheuser";
$cppass = "herethepass";
$cpdom = "herethehost";
$cpskin = "heretheskin";
$cpport = "heretheport";

Please use that so i can understand better. This exactly what i need. Also I can donate if you can get this to work for me.

Thanks,
Richi

  2. Re: [How-To]   Reply  
Picture of Ralph
Ralph
2008-11-30 02:59:43 - In reply to message 1 from Richi Gnz
$cpuser = "the username for the cpanel you want to log into";
$cppass = "the password for the cpanel acccess";
$cpdom = "your_website.com";
$cpskin = "X or X3 etc.";
$cpport = "2082"; // 2082 for non-SSL login

  3. Re: [How-To]   Reply  
Picture of Richi Gnz
Richi Gnz
2008-11-30 20:44:32 - In reply to message 2 from Ralph
Thanks for reply, but where in the code i add those variables.

In my script the data is taken from sql like this. using define.


$cpdom = EMAL_CPDOM;
$cppwd = EMAIL_CPPWD;
/*VARIABLES CONTINUE BEING FETCHED FROM DB*/

so do i add the varibles in example.php?

Like this?
<?php
require_once('cPanel.php');

//Create a cPanel object using SSL
$cPanel = new emailAccount($cpdom, $cpusr, $cppwd, $cpport, true);

echo 'Hosting Package: ' . $cPanel->getHostingPackage() . '<br>';
?>

Do i have to edit something at cPanel.php??

Thanks,
Richi

  4. Re: [How-To]   Reply  
Picture of Ralph
Ralph
2008-12-01 05:17:17 - In reply to message 3 from Richi Gnz
You add your data to example.php.

You do not have to touch cpanel.php - that is your library so you do not want to modify it at all. All your mods will be made in example.php.

  5. Re: [How-To]   Reply  
Picture of DRFB
DRFB
2009-01-04 10:04:07 - In reply to message 4 from Ralph
Ok i understand a bit of what you have said here.
I am completly confused on how to get this to work.

All i am wanting to do is have the users of my site place their new Password into a form. Once they click on submit it logs into their cpanel (webmail) and updates their password.

I have tried the direct links that some people have posted and non of them work, then i found this package and got confused on how it worked or how to modify it.

I would like to know if you could create a .php file that has the form etc on it that i can place onto my server and into an iframe so i only have to add/modify the (basic) details to get it to work..

I use Joomla and am hoping that i can get the page to automagically insert the username into the fields so my users only have to put a new password into it.

Would be great if you can assist.
Thanks in Advance

  6. Re: [How-To]   Reply  
Picture of Sebastian Muņoz
Sebastian Muņoz
2009-05-09 21:58:08 - In reply to message 4 from Ralph
I have this problem :

"
Hosting Package:
Disk Space Used: 0 MB
MySQL Space Used: 0 MB
Bandwidth Used: 0 MB
Contact Email:
Free Space: Unlimited MB
"
i try to connect but the script returns all values "0", what im doing wrong?

My php :
$cPanel = new cPanel('mydomain.com', 'myusername', 'mypass',2082,false);