Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Nov 2002
    Location
    Canada
    Posts
    184

    Default Update client contact info

    I am trying to update my clients' control panel email address from a php form on my website. My php script should log into the client's account, pass the email variable to saveemail.html, and update their address.

    Unfortunately, it appears that saveemail.html doesn't pick up the passed variable.

    Would anyone have any ideas on how to do this? Here's what I've been working with:

    // update control panel email address
    // $host is already defined
    $socket = fsockopen($host,2082);
    $user = &$username&;
    $password = $value['password'];
    $authstr = &$user:$password&;
    $pass_cp = base64_encode($authstr);
    $in = &GET saveemail.html?email=$email HTTP/1.0\r\nAuthorization: Basic $pass_cp \r\n&;
    fputs($socket,$in);
    fclose($socket);

    I've also tried
    $in = &GET /frontend/vertex/saveemail.html?email=$email HTTP/1.0\r\nAuthorization: Basic $pass_cp \r\n&;

    and
    $in = &GET http://$host/frontend/vertex/saveemail.html?email=$email HTTP/1.0\r\nAuthorization: Basic $pass_cp \r\n&;

    Any help is greatly appreciated!

  2. #2
    Moderator cPanel Partner NOC Badge dgbaker's Avatar
    Join Date
    Sep 2002
    Location
    Toronto, Ontario Canada
    Posts
    2,773

    Default

    try changing
    $in = &GET http://$host/frontend/vertex/saveemail.html?email=$email HTTP/1.0\r\nAuthorization: Basic $pass_cp \r\n&;

    to

    $in = &GET http://$host:2082/frontend/vertex/saveemail.html?email=$email HTTP/1.0\r\nAuthorization: Basic $pass_cp \r\n&;

    Adding the port.
    Regards,
    David
    Forum Moderator

  3. #3
    Member
    Join Date
    Nov 2002
    Location
    Canada
    Posts
    184

    Default

    Thanks for the quick reply David.

    Unfortunately, adding the host and port didn't work either.

  4. #4
    Moderator cPanel Partner NOC Badge dgbaker's Avatar
    Join Date
    Sep 2002
    Location
    Toronto, Ontario Canada
    Posts
    2,773

    Default

    Could you pm me the entire script to look at?
    Regards,
    David
    Forum Moderator

  5. #5
    Member
    Join Date
    Nov 2002
    Location
    Canada
    Posts
    184

    Default

    [quote:b02fe85c02][i:b02fe85c02]posted by dgbaker[/i:b02fe85c02]
    Could you pm me the entire script to look at?[/quote:b02fe85c02]
    I would, but it's 1326 lines! I'm integrating small requirements like this email address update into a pre-built script I found called Service Support Manager (SSM).

    Essentially, my entire script is what I already put in my original message. I just use the variable values from the original SSM script for $host, $user, and $password. I've tried printing the values to the screen to make sure they are correct, and they are.

    When a client updates their info in SSM, I want that info to be updated in their control panel as well. I've got the password update working no problem, but this email update is a bit tricky.

    If you (or anyone) can modify the code I've got, or come up with a new approach, that'd be great. I really need to be able to do this somehow, but I'm stuck for ideas right now.

    Thanks.

Similar Threads & Tags
Similar threads

  1. Filed with Developers Update Contact Info - allow customer to use email with their own domain [Case 51861]
    By sneader in forum Feature Requests for cPanel/WHM
    Replies: 17
    Last Post: 12-02-2011, 02:47 PM
  2. Replies: 0
    Last Post: 05-28-2010, 03:22 AM
  3. Update Contact Info
    By gmm6797 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-09-2010, 07:42 AM
  4. /script to update contact info
    By h2oski in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 02-20-2004, 08:38 PM
  5. updating client contact email
    By Radio_Head in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 02-12-2003, 03:13 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube