Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $domain = "prometheusmooc";
- $url = file_get_contents("https://api.vk.com/method/wall.getById?posts=93388_21539,93388_20904, -1_340364");
- $data = json_decode($url,true);
- if($data['error']['error_code']){echo "Ошибка <b>".$data['error']['error_code']."</b>";}
- else{
- //echo '<pre>';
- //print_r($data);
- for($i=1;$i<$data['response'][$i];$i++){
- echo"
- <div class='wr'>
- <div class='num'>".$i."</div>
- <p>".$data['response'][$i]['text']."</p>
- <a href='https://vk.com/".$domain."?w=wall".$data['response'][$i]['from_id']."_".$data['response'][$i]['id']."' target='_blanc'>Смотреть на стене</a>
- </div>
- ";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement