อยากจะติดต่อระหว่า php กับ FileZilla Server-
-add user ...
-del user
home dict
สิทธิ์
สร้าง Folder
ทำอย่าไงครับ
ใครได้บ้าง
add sub domain ผ่านPHP ทั้งหมดเลยครับ
โปรเจค ทำ Free Hosting บน IIS ไม่เกรี่ยง หรือ อาปาเช่
ภาษาไทย สำหรับ phpBB เวอร์ชั่นล่าุด คือ 3.2.2
มาแล้วโหลดได้เลย
มาแล้วโหลดได้เลย
อยากจะติดต่อระหว่า php กับ FileZilla Server--add user ...
Moderator: phpbb, mindphp, ผู้ดูแลกระดาน
-
- phpBBThailand Jr. Member
- โพสต์: 11
- ลงทะเบียนเมื่อ: 01 ม.ค. 1970, 07:00
จะใช้ OS อะไรครับ
สร้างไฟล์ pdf online
ท่องเที่ยว http://www.thailandhotelforums.com/" onclick="window.open(this.href);return false;
สอน php http://www.mindphp.com/" onclick="window.open(this.href);return false;
ท่องเที่ยว http://www.thailandhotelforums.com/" onclick="window.open(this.href);return false;
สอน php http://www.mindphp.com/" onclick="window.open(this.href);return false;
-
- phpBBThailand Jr. Member
- โพสต์: 11
- ลงทะเบียนเมื่อ: 01 ม.ค. 1970, 07:00
สิงที่ต้อง ศึกษา
คือ DNS
Config ต่างๆ ของ FileZillaFTP ว่าเก็บ ค่าต่างๆ ไว้ที่ไหน
แล้วเขียน php ไปแก้ไข ค่าต่างๆ เหล่านั้นเอา เอง
คือ DNS
Config ต่างๆ ของ FileZillaFTP ว่าเก็บ ค่าต่างๆ ไว้ที่ไหน
แล้วเขียน php ไปแก้ไข ค่าต่างๆ เหล่านั้นเอา เอง
สร้างไฟล์ pdf online
ท่องเที่ยว http://www.thailandhotelforums.com/" onclick="window.open(this.href);return false;
สอน php http://www.mindphp.com/" onclick="window.open(this.href);return false;
ท่องเที่ยว http://www.thailandhotelforums.com/" onclick="window.open(this.href);return false;
สอน php http://www.mindphp.com/" onclick="window.open(this.href);return false;
-
- phpBBThailand Jr. Member
- โพสต์: 11
- ลงทะเบียนเมื่อ: 01 ม.ค. 1970, 07:00
-
- phpBBThailand Jr. Member
- โพสต์: 11
- ลงทะเบียนเมื่อ: 01 ม.ค. 1970, 07:00
ถ้า เปิด ให้ php ไปรัน คำสั่ง ระบบ ได้ php ก็ ทำได้ ทุกอย่าง ล่ะครับ
แต่มันไม่ปลอดภัย
แต่มันไม่ปลอดภัย
สร้างไฟล์ pdf online
ท่องเที่ยว http://www.thailandhotelforums.com/" onclick="window.open(this.href);return false;
สอน php http://www.mindphp.com/" onclick="window.open(this.href);return false;
ท่องเที่ยว http://www.thailandhotelforums.com/" onclick="window.open(this.href);return false;
สอน php http://www.mindphp.com/" onclick="window.open(this.href);return false;
-
- phpBBThailand Jr. Member
- โพสต์: 11
- ลงทะเบียนเมื่อ: 01 ม.ค. 1970, 07:00
-
- phpBBThailand Jr. Member
- โพสต์: 11
- ลงทะเบียนเมื่อ: 01 ม.ค. 1970, 07:00
Re: อยากจะติดต่อระหว่า php กับ FileZilla Server--add user ...
ดูอยู่ยังไม่ได้เลย
<?
//ทดสอบ
$username = $_GET["user"];
$password = $_GET["password"];
function addUserFtp($username, $password, $directory) {
return array(
'filezilla_config' => array(
'title' => 'FILEZILLA_CONFIG_FILE',
'default' => "C:\\Program Files\\FileZilla Server\\FileZilla Server.xml"
),
'filezilla_exe' => array(
'title' => 'FILEZILLA_EXE_FILE',
'default' => "C:\\Program Files\\FileZilla Server\\FileZilla Server.exe"
)
);
$directory = str_replace('/', "\\", $directory);
$fzconfig = file($this->config['filezilla_config']);
$newconfig = '';
foreach ($fzconfig as $line) {
$newconfig .= $line;
if (strpos($line, '<Users>') !== false) {
$newconfig .= '<User Name="' . $username . '">
<Option Name="Pass">' . md5($password) . '</Option>
<Option Name="Group"/>
<Option Name="Bypass server userlimit">0</Option>
<Option Name="User Limit">0</Option>
<Option Name="IP Limit">0</Option>
<Option Name="Enabled">1</Option>
<Option Name="Comments"/>
<Option Name="ForceSsl">0</Option>
<IpFilter>
<Disallowed/>
<Allowed/>
</IpFilter>
<Permissions>
<Permission Dir="' . $directory . '">
<Option Name="FileRead">1</Option>
<Option Name="FileWrite">1</Option>
<Option Name="FileDelete">1</Option>
<Option Name="FileAppend">1</Option>
<Option Name="DirCreate">1</Option>
<Option Name="DirDelete">1</Option>
<Option Name="DirList">1</Option>
<Option Name="DirSubdirs">1</Option>
<Option Name="IsHome">1</Option>
<Option Name="AutoCreate">0</Option>
</Permission>
</Permissions>
<SpeedLimits DlType="0" DlLimit="10" ServerDlLimitBypass="0" UlType="0" UlLimit="10" ServerUlLimitBypass="0">
<Download/>
<Upload/>
</SpeedLimits>
</User>
';
}
}
$fp = fopen($this->config['filezilla_config'], 'w');
fwrite($fp, $newconfig);
fclose($fp);
}
function restartFTPServer() {
exec($this->config['filezilla_exe'] . ' /reload-config');
}
function getRestartNeeded() {
return true;
}
function userExists($username) {
$fzconfig = file_get_contents($this->config['filezilla_config']);
if (strpos($fzconfig, '<User Name="' . $username) !== false) {
return true;
} else {
return false;
}
}
function deleteUser($username) {
$config = file_get_contents($this->config['filezilla_config']);
$regex = "#\\<User Name=\"" . preg_quote($username) . "\"\\>";
$regex .= "(.*?)";
$regex .= "\\</User\\>#si";
$config = preg_replace($regex, '', $config);
$fp = fopen($this->config['filezilla_config'], 'w');
fwrite($fp, $config);
fclose($fp);
exec($this->config['filezilla_exe'] . ' /reload-config');
}
//include('../includes/header.inc.php');
addUserFtp($username,$password,'C:\\php\\');
//include('../includes/footer.inc.php');
?>
ยัง add user ไม่ได้เลย ใครมีความรู้ช่วยดูที
<?
//ทดสอบ
$username = $_GET["user"];
$password = $_GET["password"];
function addUserFtp($username, $password, $directory) {
return array(
'filezilla_config' => array(
'title' => 'FILEZILLA_CONFIG_FILE',
'default' => "C:\\Program Files\\FileZilla Server\\FileZilla Server.xml"
),
'filezilla_exe' => array(
'title' => 'FILEZILLA_EXE_FILE',
'default' => "C:\\Program Files\\FileZilla Server\\FileZilla Server.exe"
)
);
$directory = str_replace('/', "\\", $directory);
$fzconfig = file($this->config['filezilla_config']);
$newconfig = '';
foreach ($fzconfig as $line) {
$newconfig .= $line;
if (strpos($line, '<Users>') !== false) {
$newconfig .= '<User Name="' . $username . '">
<Option Name="Pass">' . md5($password) . '</Option>
<Option Name="Group"/>
<Option Name="Bypass server userlimit">0</Option>
<Option Name="User Limit">0</Option>
<Option Name="IP Limit">0</Option>
<Option Name="Enabled">1</Option>
<Option Name="Comments"/>
<Option Name="ForceSsl">0</Option>
<IpFilter>
<Disallowed/>
<Allowed/>
</IpFilter>
<Permissions>
<Permission Dir="' . $directory . '">
<Option Name="FileRead">1</Option>
<Option Name="FileWrite">1</Option>
<Option Name="FileDelete">1</Option>
<Option Name="FileAppend">1</Option>
<Option Name="DirCreate">1</Option>
<Option Name="DirDelete">1</Option>
<Option Name="DirList">1</Option>
<Option Name="DirSubdirs">1</Option>
<Option Name="IsHome">1</Option>
<Option Name="AutoCreate">0</Option>
</Permission>
</Permissions>
<SpeedLimits DlType="0" DlLimit="10" ServerDlLimitBypass="0" UlType="0" UlLimit="10" ServerUlLimitBypass="0">
<Download/>
<Upload/>
</SpeedLimits>
</User>
';
}
}
$fp = fopen($this->config['filezilla_config'], 'w');
fwrite($fp, $newconfig);
fclose($fp);
}
function restartFTPServer() {
exec($this->config['filezilla_exe'] . ' /reload-config');
}
function getRestartNeeded() {
return true;
}
function userExists($username) {
$fzconfig = file_get_contents($this->config['filezilla_config']);
if (strpos($fzconfig, '<User Name="' . $username) !== false) {
return true;
} else {
return false;
}
}
function deleteUser($username) {
$config = file_get_contents($this->config['filezilla_config']);
$regex = "#\\<User Name=\"" . preg_quote($username) . "\"\\>";
$regex .= "(.*?)";
$regex .= "\\</User\\>#si";
$config = preg_replace($regex, '', $config);
$fp = fopen($this->config['filezilla_config'], 'w');
fwrite($fp, $config);
fclose($fp);
exec($this->config['filezilla_exe'] . ' /reload-config');
}
//include('../includes/header.inc.php');
addUserFtp($username,$password,'C:\\php\\');
//include('../includes/footer.inc.php');
?>
ยัง add user ไม่ได้เลย ใครมีความรู้ช่วยดูที
-
- phpBBThailand Jr. Member
- โพสต์: 11
- ลงทะเบียนเมื่อ: 01 ม.ค. 1970, 07:00
Re: อยากจะติดต่อระหว่า php กับ FileZilla Server--add user ...
มีใครเคยทำบ้างครับ แนะนำครับ หาตามเว็บต่างๆแล้ว คนทั่วไปไม่เคยมีใครพูดถึงเลย ไม่รู้ทำไม
ทำทดสอบก่อนคือ
กดรับค่า user password namefolder
แล้วผมไปสร้างfolder(ทำแล้ว)
แล้วไปเพิ่มชื่อใน mysql (ทำบางส่วนอยู่)
แล้วทำค่าต่างuser password part+namefolder ไป Adduser ใน ftp
ทำทดสอบก่อนคือ
กดรับค่า user password namefolder
แล้วผมไปสร้างfolder(ทำแล้ว)
แล้วไปเพิ่มชื่อใน mysql (ทำบางส่วนอยู่)
แล้วทำค่าต่างuser password part+namefolder ไป Adduser ใน ftp
Re: อยากจะติดต่อระหว่า php กับ FileZilla Server--add user ...
โหลด phpBB3 ภาษาไทย ทั้งหน้าเว็บ และ admin
รวมพลคนใช้ phpBB3 แนะนำคนอื่นบ้างนะครับ ทุกคำถามจะได้มีคำตอบ แนะนำคนอื่นๆบ้างนะ ช่วยๆกันไป
สมาชิกใหม่ ก่อนถามแนะนำตัว
http://www.phpbbthailand.com/viewforum.php?f=41
กฏการใช้งานบอร์ด
http://www.phpbbthailand.com/viewtopic.php?f=37&t=5940
รวมพลคนใช้ phpBB3 แนะนำคนอื่นบ้างนะครับ ทุกคำถามจะได้มีคำตอบ แนะนำคนอื่นๆบ้างนะ ช่วยๆกันไป
สมาชิกใหม่ ก่อนถามแนะนำตัว
http://www.phpbbthailand.com/viewforum.php?f=41
กฏการใช้งานบอร์ด
http://www.phpbbthailand.com/viewtopic.php?f=37&t=5940
-
- phpBBThailand Jr. Member
- โพสต์: 11
- ลงทะเบียนเมื่อ: 01 ม.ค. 1970, 07:00
Re: อยากจะติดต่อระหว่า php กับ FileZilla Server--add user ...
ของผมทำได้เยอะละเก็บอยู่ที่ http://www.mindphp.com/forums/viewtopic ... 9338#p9338
ผู้ใช้งานขณะนี้
กำลังดูบอร์ดนี้: 209 และ บุคคลทั่วไป 0 ท่าน