$file_url = ‘https://www.airtistic.net/wp-content/uploads/2019/01/logo_main-2.png’; function getRemoteFilesize($file_url, $formatSize = true) { $head = array_change_key_case(get_headers($file_url, 1)); // content-length of download (in bytes), read from Content-Length: field $clen = isset($head[‘content-length’]) ? $head[‘content-length’] : 0; // cannot retrieve file size, return “-1” if (!$clen) { return –1; } if (!$formatSize) { return $clen; // return size in bytes } $size ..
Category : PHP Scripts
The easiest way is to create a function to get the HASH with a simple online request. The script to see the HASH in the browser (PHP): <?php function get_hash($address) { function x509_fingerprint($pem,$hash=’sha1′) { $hash = in_array($hash,array(‘sha1′,’md5′,’sha256’)) ? $hash: ‘sha1’; $pem = preg_replace(‘/\-+BEGIN CERTIFICATE\-+/’,”,$pem); $pem = preg_replace(‘/\-+END CERTIFICATE\-+/’,”,$pem); $pem = str_replace( array(“\n”,”\r”), ”, trim($pem)); return ..
We have built a function easy to use on any project. Example how to use on the end of the code. <?php // Parameters avvailable for $inf: // name, index, crc, size, mtime, comp_size, comp_method // $zipindex is the index from the file inside the zip function GetZipInfo($file, $zipindex, $inf) { $zip = new ZipArchive; ..
You need to convert the string to time and compare with the actual time. <?php if( strtotime(“2020-04-16”) < time() ){ // Your date is in the past } else { // Your date is not in the pa..