Instantly share code, notes, and snippets.

Embed
What would you like to do?
Код который сохраняет все стандартные аватарки с сервиса 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