Created
December 11, 2015 09:16
-
-
Save Teino1978-Corp/bd44a8da34b34df527ae to your computer and use it in GitHub Desktop.
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 | |
require 's3/bootstrap.php'; | |
$url = 'ftp://ftp10.simba.ru/katalog/3315424.jpg'; | |
//$r = Socket::getHeaders($url, $m); | |
//var_dump($r, $m); | |
$c = curl_init(); | |
curl_setopt($c, CURLOPT_URL, $url); | |
curl_setopt($c, CURLOPT_MAXREDIRS, 3); | |
curl_setopt($c, CURLOPT_FOLLOWLOCATION, true); | |
curl_setopt($c, CURLOPT_NOBODY, true); | |
curl_setopt($c, CURLOPT_VERBOSE, false); | |
curl_setopt($c, CURLOPT_RETURNTRANSFER, true); | |
curl_exec($c); | |
$length = curl_getinfo($c, CURLINFO_CONTENT_LENGTH_DOWNLOAD); | |
echo "length: $length\n"; | |
curl_close($c); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment