| Server IP : 202.61.199.114 / Your IP : 216.73.217.139 Web Server : nginx/1.22.1 System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : web20 ( 1018) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/clients/client2/web18/web/crons/ |
Upload File : |
<?php
define("API_URL", "https://seaside.pacim.de/includes/price.php?token=LUiUwtkf44iZFtrQC_BR&type=db");
define("USER_AGENT", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.2 (KHTML, like Gecko) Chrome/22.0.1216.0 Safari/537.2");
define("FILE_PATH", "/var/www/api.pacim.de/web/src/PaCIM/includes/price.json");
// create curl resource
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, API_URL );
curl_setopt( $ch, CURLOPT_USERAGENT, USER_AGENT );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
$oldContent = is_file( FILE_PATH ) ? file_get_contents( FILE_PATH ) : FALSE;
$newContent = trim( preg_replace(' /\s+/', ' ', curl_exec( $ch ) ) );
// save content, if anything changed
if( !empty( $newContent ) && ( md5( $oldContent ) != md5( $newContent ) ) ) {
file_put_contents( FILE_PATH, trim( preg_replace(' /\s+/', ' ', curl_exec( $ch ) ) ) );
echo "api.pacim.de price successfully updated (" . FILE_PATH . ")\n";
}
else {
#echo "api.pacim.de no changes\n";
}
curl_close( $ch );
//echo $output;