Skip to content

Instantly share code, notes, and snippets.

@iredun
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iredun/72dc4a3dccf681b399f8 to your computer and use it in GitHub Desktop.
Save iredun/72dc4a3dccf681b399f8 to your computer and use it in GitHub Desktop.
Код который сохраняет все стандартные аватарки с сервиса evernote
<?php
ini_set("max_execution_time", "1500");
$url='https://www.evernote.com/redesign/business/BusinessHomeAction/letters/';
$abc=range('a','z');
function getSslPage($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_REFERER, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
foreach ($abc as $key => $value) {
for ($i=1; $i <=4; $i++) {
$name=$value."_450px_".$i.".png";
$fp = fopen($name, 'x');
fwrite($fp, getSslPage($url.$name));
fclose($fp);
echo $name."- OK<br>";
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment