Advertisement
Ostap34JS

Untitled

Feb 25th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | None | 0 0
  1.         $domain = "brain_script";
  2.         $url = file_get_contents("https://api.vk.com/method/wall.get?domain=".$domain . "&w=wall-43248954_735236");
  3.         $data = json_decode($url,true);
  4.         if($data['error']['error_code']){echo "Ошибка <b>".$data['error']['error_code']."</b>";}
  5.         else{
  6.             //echo '<pre>';
  7.             //print_r($data);
  8.             for($i=1;$i<$data['response'][$i];$i++){
  9.                 echo"
  10.        <div class='wr'>
  11.        <div class='num'>".$i."</div>
  12.        <p>".$data['response'][$i]['text']."</p>
  13.        <a href='https://vk.com/".$domain."?w=wall".$data['response'][$i]['from_id']."_".$data['response'][$i]['id']."' target='_blanc'>Смотреть на стене</a>
  14.        </div>
  15.        ";
  16.             }
  17.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement