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!

Park domains cPanel API

Discussion in 'General Discussion' started by diwan1, Jun 7, 2010.

  1. diwan1

    diwan1 Registered

    Joined:
    Jun 7, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    51
    <?php
    $top_domain="mytopdomain.com";
    $park_domain="myparkdomain.com";
    $top_domain_cpanel_username="myuser";
    $top_domain_cpanel_password="mypass";
    $theme="x3";

    $url="http://$top_domain:2082/frontend/$theme/park/doaddparked.html?domain=$park_domain";
    $context = stream_context_create(array(
    'http' => array(
    'header' => "Authorization: Basic " . base64_encode("$top_domain_cpanel_username:$top_domain_cpanel_password")
    )
    ));
    echo $data = file_get_contents($url, false, $context);
    ?>


    okwebmaster.com PHP Team
    okdiwan@gmail.com
    malee.email@gmail.com
     
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