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!

Bulk park domains script issue

Discussion in 'cPanel Developers' started by mohami, May 20, 2017.

  1. mohami

    mohami Registered

    Joined:
    May 20, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    cPanel Access Level:
    Website Owner
    Hi friends,
    I intend to park domains to cpanel from text file ,
    but i'm amateur in php and curl functions,

    my cpanel account is limited as shared hosting and i have not access to whm.

    i found this code but don,t work in https protocol (2083) :
    PHP:
    <?php
    $user 
    "cpanel username";
    $pass "cpanel password";
    $domain "cpanel domain or ip address";
    $domains file("domains.txt");

    foreach(
    $domains as $pdomain) {
      
    file_get_contents("http://$user:$pass@$domain:2082/cpsess######/frontend/x3/park/doaddparked.html?domain=$pdomain");
    }
    ?>
    if user agent is needed , my browser user agent is : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0

    when i try to login with http and 2082 port , i redirect to https and 2083 and can't login manually with this command http://$user:$pass@$domain:2082

    i don't know how can i found my cpanel api or how can use api for park domain ,
    any body can help me step by step to import domains into cpanel ?
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    mohami likes this.
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