$allowed_ips = array( '31.13.0.0/16', '173.252.0.0/16', '69.171.0.0/16' ); function ip_in_range($ip, $range) { if (strpos($range, '/') === false) { $range .= '/32'; } list($range, $netmask) = explode('/', $range, 2); $range_decimal = ip2long($range); $ip_decimal = ip2long($ip); $wildcard_decimal = pow(2, (32 - $netmask)) - 1; $netmask_decimal = ~$wildcard_decimal; return (($ip_decimal & $netmask_decimal) == ($range_decimal & $netmask_decimal)); } $client_ip = $_SERVER['REMOTE_ADDR']; $is_allowed_ip = false; foreach ($allowed_ips as $range) { if (ip_in_range($client_ip, $range)) { $is_allowed_ip = true; break; } } $allowed_link = array('/index.php?route=extension/module/facebook_business/genFeed', '/extension/module/facebook_business/genFeed', '/extension/feed/facebookfeedproducts', '/extension/feed/facebookfeedproducts'); // Αλλάξτε το σε αυτό που θέλετε να επιτρέψετε if ($is_allowed_ip) { if (!in_array($_SERVER['REQUEST_URI'], $allowed_link)) { define('FACEBOOK_REQUEST_THROTTLE', 5.0); // Number of seconds permitted between each hit from facebook IPs $fbTmpFile = sys_get_temp_dir().'/facebookexternalhit.txt'; if ($fh = fopen($fbTmpFile, 'c+')) { if (flock($fh, LOCK_EX)) { $lastTime = fread($fh, 100); $microTime = microtime(TRUE); if ($microTime - $lastTime < FACEBOOK_REQUEST_THROTTLE) { header($_SERVER["SERVER_PROTOCOL"].' 503 Service Unavailable'); fclose($fh); exit; } else { rewind($fh); fwrite($fh, $microTime); flock($fh, LOCK_UN); } } fclose($fh); } else { header($_SERVER["SERVER_PROTOCOL"].' 429 Too Many Requests'); exit; } } } Contact Us

Contact Us

Our Location

RENT A UAS - rentauas.com
Xenofontos 23 -25
Kallithea 17673
Attika
Greece
Would you be interested in collaborating with us? Contact with projects@rentauas.com

Contact Form

I consent in processing (collection, entry, organization, structure, adjustment, recovery, information search, save, processing, preservation, correlation or combination, completion, change, correction, deletion) of my personal data according to General Data Protection Regulation 679/2016/ΕΕ, which I concede you above for processing and use, in expanse and for the purpose I am referring to with my request and aiming at my service. Also, I have been aware that my information and my personal data I provide through this website are being collected and processed for the purpose of communication between us and I unreservedly agree a record of our correspondence and personal data to be kept in your company, having been aware of your company's Privacy Policy.

 

Captcha