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.

Domain/SSL expire notices in left column

Discussion in 'cPanel Developers' started by inetbizo, Feb 16, 2012.

  1. inetbizo

    inetbizo Well-Known Member

    Joined:
    Mar 28, 2008
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    New Smyrna Beach, FL US
    cPanel Access Level:
    Root Administrator
    Twitter:
    Can anyone help post code that will tell the CP user:

    1. SSL Installed = True -> Show Expire notice warning
    2. Domain Expire Notices
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I'm going to move this over to our integration forum, you may have better luck getting a response there :).
     
  3. Brian

    Brian Well-Known Member

    Joined:
    Dec 1, 2010
    Messages:
    117
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Texas
    cPanel Access Level:
    Root Administrator
    Presently there are no API calls you can make that reference SSL expiration information. Since cPanel & WHM currently does have some logic present that checks the server hostname's SSL certificates/Service SSL certificates to see if they're close to expiring, you could borrow from this same code to write your own Perl module/script.

    A good place to start for code references would be:

    • /usr/local/cpanel/bin/checkallsslcerts
    • Cpanel::SSLCerts::checkExpired() (/usr/local/cpanel/Cpanel/SSLCerts.pm)

    But, as mentioned, there isn't anything in the way of API1/API2/XML-API calls at this time for such actions.

    cPanel & WHM has no code that deals with Domain Registrar information, API or otherwise. This is something you would have to write and develop from scratch. Be aware that polling the "Expire" date from a registrar's WHOIS server may not be entirely accurate.

    This article explains the caveat you'll have to consider: You say my domain is expired, but the whois says it doesn't expire for another year. Which is right? | Domain Name Knowledge Base

    Although, such a script would be a bit redundant in my opinion. If clients are buying their domains through your company, I'd advise simply using the billing software you use to renew their domains to alert them of their impending domain expiration. If they do not buy their domains through you, then they should be getting impending expiration notifications from their respective registrar.

    --

    Both of the items you are looking for would involve a reasonable amount of custom code, so simply be aware of that.

    In your thread title you say "in the left column". I gather you want these alerts to show in the "Stats" block within a user's cPanel UI? If so, this goes beyond simple branding. You'd have to duplicate the x3 theme entirely to a custom named theme and manually edit the theme files to include the custom code that you wrote for the aforementioned 2 features.

    This would not be a simple process, and I can only advise that you hire a knowledgeable programmer if this is something you'd like to explore doing.

    You may want to post these suggestions in the Feature Request forum if you would like to see them in the product. The more support a given feature receives, the more likely it will be considered for inclusion into the product. The SSL Expiration sounds doable/reasonable, but I'm not sure how we could ever get reliable domain expiration information from WHOIS servers (per the aforementioned caveat). If you have any input/suggestions for that, I'd love to hear them in a feature request thread.
     
  4. electric

    electric Well-Known Member

    Joined:
    Nov 5, 2001
    Messages:
    697
    Likes Received:
    1
    Trophy Points:
    18
    I think getting domain registration expiration info would be very difficult.. and misleading. What if the customer has multiple domains? (parked, addons, or other domains they have registered but aren't actively added to the cpanel?)

    It would be impossible to have this "built-in" to cpanel in any reliable way that is useful for the majority of cpanel customers.

    You could speak with your billing software developer to see if they can provide a cpanel plug. Most billing software is where domain registerations and management occurs these days, so some good "domain registration info" integration with cpanel theme seems smart...

    With regard to the SSL Certificate stuff... I think this is a good idea. The Cpanel software knows if a domain has ssl installed (since this info is in WHM, etc..) so it makes sense to have it displayed in the cpanel stats area.
     
Loading...

Share This Page