Ofline
По любым вопросам,тут в теме
[HIDE=1]
[/HIDE]
[HIDE=1]
JavaScript:
function HTTPEncode(const AStr: String): String;
const
NoConversion = ['A'..'Z', 'a'..'z', '*','@','.','_','-'];
var
Sp, Rp: PChar;
begin
SetLength(Result, Length(AStr) * 3);
Sp := PChar(AStr);
Rp := PChar(Result);
while Sp^ <> #0 do
begin
if Sp^ in NoConversion then
Rp^ := Sp^
else
if Sp^ = ' ' then
Rp^ := '+'
else
begin
FormatBuf(Rp^, 3, '%%%.2x', 6, [Ord(Sp^)]);
Inc(Rp,2);
end;
Inc(Rp);
Inc(Sp);
end;
SetLength(Result, Rp - PChar(Result));
end;
PHP:
response:= send ('GET','https://api.vk.com/method/wall.post?owner_id=95921229&from_group=1&message='+HTTPEncode(Edit3.Text)+'%20'+URLEncode(edit6.text)+'&services=twitter&version=5.33&access_token='+token);
[/HIDE]