This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$i = 1; | |
$path = 'files/'; // path to files | |
$separator = '-logo-'; // separator to divide the string and take the first part | |
$errors = []; | |
foreach (glob($path . '*.*') as $name) { | |
$filename = basename($name); | |
$arrayOfString = explode($separator, $filename); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getIp() | |
{ | |
//check ip from share internet | |
if (!empty($_SERVER['HTTP_CLIENT_IP'])) { | |
return $_SERVER['HTTP_CLIENT_IP']; | |
} | |
//to check ip is pass from proxy | |
if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { | |
return $_SERVER['HTTP_X_FORWARDED_FOR']; |
OlderNewer