Код на C#. Только что проверил. Токен через standalone. Может, поможет (на php нет под рукой)
private void sendMessage(string msg)
{
string url = "https://api.vk.com/method/wall.post?owner_id=" + Convert.ToString(id_group);
url += "&message=" + msg;
url += "&v=5.21";
url += "&access_token=" + token;
lblLog.Text = Response(url);
}
private string Response(string request_path) //на вход подаем URL API
{
string response = string.Empty;
HttpWebRequest Request = (HttpWebRequest)WebRequest.Create(request_path); //отправление запроса к серверу API
HttpWebResponse Response = (HttpWebResponse)Request.GetResponse(); //получение ответа от сервера API
Stream receiveStream = Response.GetResponseStream();
Encoding encode = System.Text.Encoding.GetEncoding("utf-8");
StreamReader readStream = new StreamReader(receiveStream, encode);
Char[] read = new Char[256];
int count = readStream.Read(read, 0, 256);
while (count > 0)
{
String line = new String(read, 0, count);
response += line + "\r\n";
count = readStream.Read(read, 0, 256);
}
Response.Close();
readStream.Close();
return response;
}