Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Jun 2004
    Posts
    6

    Default Adding Email accounts using an external script, yet again

    Guys I'm so sorry to bring this up again, but do you guys know if it possible to redirect this script to a costume header?

    I would like the sucess page to differ from the Cpanel sucess page.

    But I can't seem to add a header without getting errors.


    Script by user NAMELESS

    #!/usr/local/bin/php

    <?
    $email = "xxx";
    $udomain = "xxxx.com";
    $upass = "yyyy";
    $quota = 1;

    $host = "zzzzz.com";
    $socket = fsockopen($host,2082);
    if(!$socket)
    {
    print('Socket error');
    exit();
    }
    $user = "qqqq";
    $password = "wwwwwww";
    $authstr = "$user:$password";
    $pass = base64_encode($authstr);
    $in1 = "GET /frontend/x/mail/doaddpop.html?email=$email&domain=$udomain&password=$upass&quota=$quota\r\n";
    $in2 = "HTTP/1.0\r\n";
    $in3 = "Host:$udomain\r\n";
    $in4 = "Authorization: Basic $pass\r\n";
    $in5 = "\r\n";

    fputs($socket,$in1);
    fputs($socket,$in2);
    fputs($socket,$in3);
    fputs($socket,$in4);
    fputs($socket,$in5);
    while (!feof($socket)) {
    echo fgets ($socket,128);
    }
    fclose( $socket );
    ?>

  2. #2
    Member
    Join Date
    Jun 2004
    Posts
    6

    Default

    anyone?

  3. #3
    Member
    Join Date
    Jul 2004
    Posts
    12

    Default

    I am trying to do the same but having trouble using my scroipt i have..

  4. #4
    Member
    Join Date
    Feb 2004
    Posts
    329

    Default

    fputs($socket,$in5);
    while (!feof($socket)) {
    echo fgets ($socket,128);
    }
    fclose( $socket );
    header("Location: http://yoursite.tld");
    ?>

    Try adding the last line.

  5. #5
    Member
    Join Date
    Jun 2004
    Posts
    6

    Default

    Fwebs, thanks, but naturaly, I had already tried that.

  6. #6
    Member
    Join Date
    Feb 2004
    Posts
    329

    Default

    And you've also tried removing the echo in this line 'echo fgets ($socket,128);' I assume then.

  7. #7
    Member
    Join Date
    Jun 2004
    Posts
    6

    Default

    Quote Originally Posted by fwwebs
    And you've also tried removing the echo in this line 'echo fgets ($socket,128);' I assume then.
    Actually, I haven't tried that.

    Thank you very much my friend.

Similar Threads & Tags
Similar threads

  1. Adding Bcc headers into specific email accounts on server side.
    By ramprage in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 08-11-2006, 11:40 PM
  2. Replies: 1
    Last Post: 05-06-2005, 05:16 AM
  3. Adding Email Accounts/Checking Quotas
    By lbowen in forum E-mail Discussions
    Replies: 3
    Last Post: 05-03-2005, 05:20 PM
  4. Script for adding email users to a domain?
    By eger in forum cPanel and WHM Discussions
    Replies: 28
    Last Post: 05-05-2004, 09:16 AM
  5. adding email accounts with php script
    By tundra96 in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 07-15-2003, 06:48 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube