Jump to content
  • 0

pomoc PHP Ban List


Riko

Dotaz

Zdravím,

 

Ví někdo, jak vytvořit online FTP Banlist na WordPress (PHP) webu, popřípadě mi odeslal již vytvořený kód s tabulkou atd a já jen upravil FTP údaje?

Ozvěte se mi prosím na Skype waymootrze.

Díky a hezký zbytek dne.

 

Link to comment
Share on other sites

5 odpovědí na tuto otázku

Recommended Posts

  • 0
  • Administrátor
<?php

// define some variables
$local_file = 'local.zip';
$server_file = 'server.zip';

// set up basic connection
$conn_id = ftp_connect($ftp_server);

// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);

// try to download $server_file and save to $local_file
if (ftp_get($conn_id, $local_file, $server_file, FTP_BINARY)) {
    echo "Successfully written to $local_file\n";
} else {
    echo "There was a problem\n";
}

// close the connection
ftp_close($conn_id);

?>
//http://php.net/manual/en/function.ftp-get.php

V podstatě použij tohle. A pak to jen vypíšeš respektive vyparsuješ aby to nějak vypadalo

Link to comment
Share on other sites

  • 0
  • Administrátor

to stejné treba to je jen jak se má jmenovat soubor který to má zkopírovat ze serveru ( $server file ) a jak se má jmenovat soubor na webu $localfile

Link to comment
Share on other sites

  • 0

Mám to takhle ale nicse nezobrazuje ...je to tím,že to nemám v tabulce?

<?php
 
// define some variables
$local_file = 'samp.ban';
$server_file = 'samp.ban';
 
// set up basic connection
$1 = ftp_connect($IP);
 
// login with username and password
$login_result = ftp_login($1, $NAME, $PASSWORD);
 
// try to download $server_file and save to $local_file
if (ftp_get($1, $samp.ban, $samp.ban, FTP_BINARY)) {
    echo "Successfully written to $local_file\n";
} else {
    echo "There was a problem\n";
}
 
// close the connection
ftp_close($conn_id);
 
?>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...