Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

account suspended

Discussion in 'General Discussion' started by netnameus, Jun 21, 2004.

  1. netnameus

    netnameus Well-Known Member

    Joined:
    Mar 7, 2004
    Messages:
    131
    Likes Received:
    0
    Trophy Points:
    166
    Can someone PLEASE tell me how i can call whmreq via a php script to return whether or not an account is suspended?

    Thank You
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. coastinc

    coastinc Well-Known Member

    Joined:
    Mar 13, 2002
    Messages:
    158
    Likes Received:
    0
    Trophy Points:
    316
    You can check the .htaccess of the account.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. netnameus

    netnameus Well-Known Member

    Joined:
    Mar 7, 2004
    Messages:
    131
    Likes Received:
    0
    Trophy Points:
    166
    Thank you very much! That seemed to work perfectly for me!!

    PHP:
    function do_check_suspended($cp_username){
        
    $handle = @fopen("/home2/".$cp_username."/public_html/.htaccess""r");
        
    $contents '';
        if(
    $handle){
            while (!
    feof($handle)) {
              
    $contents .= fread($handle8192);
            }
            
    fclose($handle);
        }
        if (
    strpos($contents,'suspended.page')===false)
            return 
    0;
        else
            return 
    1;
    }
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice