hi help me pleas!: below code has a error in running Error in createing subdomain white use php script: how create subdomain on server? why error happen? // SOURCE CODE IS $sub="$sub.$domain"; $file = fopen ("http://$cpaneluser:$cpanelpass@$cpanelurl:2082/frontend/x3/subdomain/doadddomain.html?domain=$sub&rootdomain=$domain&dir=public_html%2F$domain&go=Create", "r");// line282 if (!$file) { $ok = "1"; $sub=""; echo "error!"; } while (!feof ($file)) { $line = fgets ($file, 1024);// line 294 } //ERROR IS Warning: fopen(http://...@www.sp724.com:2082/frontend/x3/subdomain/doadddomain.html?domain=nikiran&rootdomain=eline4u.com&dir=public_html%2Fnikiran&go=Create) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.1 401 Access Denied Still Working in /home/pw64/public_html/sitesaz/regt-2.php on line 282 error! Warning: feof(): supplied argument is not a valid stream resource in /home/pw64/public_html/sitesaz/regt-2.php on line 294 pleas help me to solving this problem
try: file_get_contents("http://$cpaneluser:$cpanelpass@$cpanelurl:2082/frontend/x3/subdomain/doadddomain.html?domain=$sub&rootdomain=$domain&dir=public_html%2F$domain&go=Create"); PHP: instead of your fopen(); Jay