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.

Getting main domain name via php in cpanel theme

Discussion in 'General Discussion' started by alfahosts, Feb 8, 2009.

  1. alfahosts

    alfahosts Registered

    Joined:
    Feb 7, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi Guys,
    I am making a theme and I wish to grab the cpanel domain name in a php script so it can be used in a SQL query.

    I am trying to show details from our billing system in the cpanel interface via sql but I am having trouble getting the domain name from cpanel.


    Can anyone help?

    Thanks in advance.
     
  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
    The raw API1 code for displaying the main domain is:

    Code:
    <cpanel print="$CPDATA{'DNS'}">
     
Loading...

Share This Page