Answer the question
In order to leave comments, you need to log in
Why Parse error: syntax error, unexpected 'if' (T_IF)?
function get($owner_id,$offset) {
$get = 'https://api.vk.com/method/wall.get?owner_id='.$owner_id.'&count=1&offset='.$offset;
$get = json_decode(file_get_contents($get),true);
if($get['response'][1]['id'] <> file_get_contents("base/vk_".$owner_id.".txt")) {
file_put_contents("base/vk_".$owner_id.".txt", $get['response'][1]['id'])
if (count($get['response'][1]['attachments']) >= "2") {
for ($i = 0; $i <= count($get['response'][1]['attachments'])-1; $i++) {
send(" ",6,'photo'.$get['response'][1]['attachments'][$i]['photo']['owner_id'].'_'.$get['response'][1]['attachments'][$i]['photo']['pid']);
};
}
else
{
send(" ",6,'photo'.$get['response'][1]['attachment']['photo']['owner_id'].'_'.$get['response'][1]['attachment']['photo']['pid']);
};
};
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question