The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    16
    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
     
  2. coastinc

    coastinc Well-Known Member

    Joined:
    Mar 13, 2002
    Messages:
    159
    Likes Received:
    0
    Trophy Points:
    16
    You can check the .htaccess of the account.
     
  3. netnameus

    netnameus Well-Known Member

    Joined:
    Mar 7, 2004
    Messages:
    131
    Likes Received:
    0
    Trophy Points:
    16
    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;
    }
     
Loading...

Share This Page