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.

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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,999
    Likes Received:
    1,275
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    mohami likes this.
Loading...

Share This Page