if (document.cookie.indexOf(\'_visited=1\') == -1) {
var date = new Date();
date.setDate(date.getDate()+30); // месяц
document.cookie = "_visited=1; path=/; expires=" + date.toUTCString();
}
var delay_popup = 1000;
setTimeout("document.getElementById(\'parent_popup\').style.display=\'block\'", delay_popup);
function exit(){
var thisWindow = window.open("index.php",\'_self\');
var exit = confirm("Хотите закрыть страницу?");
if(exit){
thisWindow.close();
}
}
// Сколько новостей
for($i=1;$i<10;$i++){
// Получаем факты
$urlfact = 'http://randstuff.ru/fact';
$pagefact = file_get_contents($urlfact);
preg_match("/<table. *class=\"text\"><tr><td>(.*)<\/td><\/tr><\/table>/", $pagefact, $textfact);
echo $message = "Интересный факт:\n\n".$textfact[$i]."\n";
}
if(isset($date) && $date != $idat)
так? Array
(
[error_code] => 100
[error_msg] => One of the parameters specified was missing or invalid: photos_list is invalid
[request_params] => Array
(
[0] => Array
(
[key] => oauth
[value] => 1
)
[1] => Array
(
[key] => method
[value] => photos.saveWallPhoto
)
[2] => Array
(
[key] => group_id
[value] => 71359952
)
[3] => Array
(
[key] => photo
[value] => []
)
[4] => Array
(
[key] => hash
[value] => 9e0c8da37b6dd9c2e1a91d5f245ae58e
)
[5] => Array
(
[key] => server
[value] => 840629
)
)
)
Мой усложненный метод