SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Mar 2003
    Location
    In a house in the USA
    Posts
    293
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What is wrong with this cPanel code?

    I have found a script that is part of many scripts available on the market and I have tried to run this on my cPanel server and it has not worked yet. Can somebody tell me what is up with it. Thanks!

    PHP Code:
    $socket fsockopen($host,2082);
    $authstr "$cpaneluser:$cpanelpass";
    $pass base64_encode($authstr);
    $in "GET /frontend/$cpaneltheme/mail/doaddpop.html?email=$newemail&domain=$domain&password=$mpassword&a=$quota\r\n HTTP/1.0\r\nAuthorization: Basic $pass \r\n";
    fputs($socket,$in);
    fclose$socket ); 
    Daniel
    http://www.wlscripting.com - PHP Tutorials and code snippets
    Notepad++ Function List plugin tip - for PHP developers

  2. #2
    SitePoint Addict shad0w's Avatar
    Join Date
    Aug 2003
    Location
    PA
    Posts
    239
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It would help to tell us what exactly the problem is.

  3. #3
    SitePoint Enthusiast Deo's Avatar
    Join Date
    Oct 2003
    Location
    Washington, USA
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The problem is that your not including the domain name.

  4. #4
    SitePoint Enthusiast Deo's Avatar
    Join Date
    Oct 2003
    Location
    Washington, USA
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually, this should work as well:

    PHP Code:
    <?php
        $url 
    'http://$username:$password@domain.com:2082/frontend/$cpaneltheme/mail/...';
        
    $fp fopen$url"r" ); 
        
    $html join""file$url ) ); 
        
    fclose $fp ); 
        echo 
    $html;
    ?>
    ~Deo

  5. #5
    SitePoint Addict
    Join Date
    Mar 2003
    Location
    In a house in the USA
    Posts
    293
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, this is for creating pop email accounts in cPanel automatically. The domain is where the $host value is. I run it and it shows no errors that I can see but then I check for the account and it does not creat an account. I will check the code that Deo has and see if that works. Thanks!
    Daniel
    http://www.wlscripting.com - PHP Tutorials and code snippets
    Notepad++ Function List plugin tip - for PHP developers


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •