PDA

View Full Version : Error in createing subdomain white use php script: how create subdomain on server ساخت subdomain



mrjavad
پنج شنبه 15 فروردین 1387, 10:25 صبح
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.domain.com:2082/frontend/x3/subdomain/doadddomain.html?domain=sub&rootdomain=domain&dir=public_html%2Fsub&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/....... on line 294

pleas help me to solving this problem

Bahram0110
پنج شنبه 15 فروردین 1387, 14:47 عصر
سلام
به برنامه نویس خوش اومدین

پیشنهاد می کنم یا فارسی بنویسید یا انگلیسیتونو بهتر کنید :چشمک: (قوانین سایت رو بخون)

نمونه کد برای ساخت زیردامنه(Subdomain) توی همین سایت هست
بگردی پیدا می کنی...

Arman_gh
پنج شنبه 15 فروردین 1387, 16:59 عصر
برنامه‌نویس
مرجع تخصصی برنامه‌نویسان فارسی‌زبان