public function uploadFile() {
// check if upload is valid file (example: request()->file('myFileName')->isValid() )
// calculate hash of a file
$fileHash = sha1_file( request()->file('myFileName')->path() );
//search for file in database and block same file upload (Files is Elequent model)
if( Files::where('hash', $fileHash)->firstOrNull() != null) {
abort(400); // abort upload
}
// do something with file and save hash to DB
}
$url = 'http://dynupdate.no-ip.com/ip.php';
$proxy = '127.0.0.1:8888';
//$proxyauth = 'user:password';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
//curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxyauth);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
$curl_scraped_page = curl_exec($ch);
curl_close($ch);
echo $curl_scraped_page;
Во-вторых, не за лайки и репосты
if ($price >= 4000 && $price <= 6000) {
// true
} else {
// false
}
э, в убунте это так и задумано? не успел обновиться, меняй конфиги?