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!

php / check script domains

Discussion in 'General Discussion' started by richenou, Jan 26, 2008.

  1. richenou

    richenou Well-Known Member
    PartnerNOC

    Joined:
    Feb 17, 2004
    Messages:
    86
    Likes Received:
    0
    Trophy Points:
    156
    hi all
    I need your help for a script very usefull for all cpanel managers.

    host is: ns1.server.com

    I need to get the list of all domains on WHM and then to ping it
    then, display them in a webpage if the domains don't ping on this host (ns1.server.com)

    ex: ping toto.com if dont ping on ns1.server.com then display it in the page

    can you make it in php?

    thanks for your help.
     
  2. richenou

    richenou Well-Known Member
    PartnerNOC

    Joined:
    Feb 17, 2004
    Messages:
    86
    Likes Received:
    0
    Trophy Points:
    156
    <?php $domaine = 'domain.com';

    echo gethostbyname($domaine); ?>


    i tried this

    but how can I get the list of my 100 domains in whm?

    :rolleyes:
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,216
    Likes Received:
    10
    Trophy Points:
    313
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You can use the listaccts XML-API call to list the primary domain of each cPanel account on the server. Documentation for the XML-API can be found at: http://www.cpanel.net/plugins/devel
     
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