Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]Bot api gg, zmiana statusu
Piżol
post
Post #1





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 29.06.2008

Ostrzeżenie: (0%)
-----


Witam,
mam problem z GG API, proboje napisac zmiane statusu ale nie dziala:( Zwraca mi:
Kod
HTTP/1.0 401 Unauthorized

1


Funkcja:
Kod
function gg_set($from, $token, $server, $msg) {
    $headers= array(
    "from: $from\r\n",
    "token: $token\r\n"
    );
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $server);
    curl_setopt($curl, CURLOPT_POST, count($msg));
    curl_setopt($curl, CURLOPT_POSTFIELDS, $msg);
    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($curl, CURLOPT_HEADER, 1);
    echo curl_exec($curl);
    curl_close($curl);
}


$msg:
Kod
$msg = 'status_message;away;3;sss';


Bardzo proszę o pomoc
Go to the top of the page
+Quote Post
batman
post
Post #2





Grupa: Moderatorzy
Postów: 2 921
Pomógł: 269
Dołączył: 11.08.2005
Skąd: 127.0.0.1




Crossposting - http://forum.php.pl/index.php?showtopic=111559&hl=
Zamykam.



edit
Autor wyjaśnił co i jak. Otwieram.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 12:17