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!

Allowing users to "switch off" their site

Discussion in 'General Discussion' started by peasepud, Dec 30, 2008.

  1. peasepud

    peasepud Registered

    Sep 15, 2007
    Likes Received:
    Trophy Points:
    I run a number of sites for different clients and am developing a Content Management system to centralise the update of these sites. One of the suggestions made would be the ability to allow users to turn their site off and stop it from being viewed.

    Obviously I could do this via a php script on each site checking the flag to ensure the site is still to be shown before redirecting the page if not but would prefer not to have to do that if possible.

    Is there anyway I can use a script to set a redirect up or park a domain and undirect/ unpark on demand?
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Nov 29, 2006
    Likes Received:
    Trophy Points:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You can call API1 functions from the XML API as described at: . API1 has functions to park/unpark a domain and you can build a PHP script to utilize the XML API.

    The raw API1 call for parking a domain is:

    <cpanel Park="park(">
    Where is the domain to park.

    To unpark a domain, the API1 call is:

    <cpanel Park="unpark(">
    For doing a redirect domain, the API1 call is:

    <cpanel Park="setredirecturl(,toURL)">
    Where is the domain being redirected and toURL being the full URL to redirect to.

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