Код: Выделить всё
<?php $message = "Hi"; $link = "http://flapps.ru/forum/posting.php?mode=post&f=56"; $owner_id = '1111111'; $access_token = 'gwkjnjwjkwnbj24578906h2ynkjgnw8274hn2g242lhkkkh'; $request = "https://api.vkontakte.ru/method/wall.post"; $params = array( 'owner_id' => $owner_id, 'message' => $message, 'attachments' => $link, 'access_token' => $access_token); json_encode($params); $c=curl_init(); curl_setopt($c, CURLOPT_URL, $request); curl_setopt($c, CURLOPT_RETURNTRANSFER, true); curl_setopt($c, CURLOPT_FOLLOWLOCATION, true); curl_setopt($c, CURLOPT_POST, true); curl_setopt($c, CURLOPT_POSTFIELDS, $params); curl_setopt($c, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($c, CURLOPT_TIMEOUT, 30); $result=curl_exec($c); curl_close($c); return $result;