- zoesch.de - blitzkiste.net - gruene-hassberge (norbert.zoesch.de) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
25 lines
734 B
PHP
25 lines
734 B
PHP
<?php
|
|
|
|
// define some variables
|
|
$local_file = '/power/xml/spot_market/auction/germany_austria/2015/PowerSpotMarketAuctionResults-2015-01-01.xml';
|
|
$server_file = '/2015/PowerSpotMarketAuctionResults-2015-01-01.xml';
|
|
$ftp_server="infoproducts.eex.com";
|
|
$ftp_user_name="felix.zoesch_at_stwhas.de";
|
|
$ftp_user_pass="Stadtwerk#13";
|
|
|
|
$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);
|
|
|
|
?>
|