commit | author | age
|
8bd4d9
|
1 |
<?php |
JK |
2 |
class BotMessageGG extends BotMessage { |
|
3 |
function __construct() { |
|
4 |
if(!ctype_digit($_GET['from'])) { |
|
5 |
$_GET['from'] = 'invalid'; |
|
6 |
} |
|
7 |
|
|
8 |
if(!ctype_digit($_GET['to'])) { |
|
9 |
$_GET['to'] = 'invalid'; |
|
10 |
} |
|
11 |
|
|
12 |
$uid = 'Gadu-Gadu://'.$_GET['from'].'@gadu-gadu.pl'; |
|
13 |
|
|
14 |
$this->userAlt = new BotUser($uid); |
|
15 |
$this->user = new BotUser($uid.'/'.$_GET['to']); |
|
16 |
$this->session = new BotSession($uid); |
|
17 |
$this->setText(file_get_contents('php://input')); |
fb87e0
|
18 |
|
JK |
19 |
if(isset($_GET['images'])) { |
|
20 |
$images = explode(',', $_GET['images']); |
|
21 |
foreach($images as $image) { |
|
22 |
if(strlen($image) == 16 && ctype_xdigit($image)) { |
|
23 |
$this->images[] = new BotImageGG($image); |
|
24 |
} |
|
25 |
} |
|
26 |
} |
8bd4d9
|
27 |
} |
JK |
28 |
} |
|
29 |
?> |