예제 #1
0
<?php

/**
 * Copyright 2015 Eric Enold <*****@*****.**>
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
require 'vendor/autoload.php';
$telegram = new \Zyberspace\Telegram\Cli\Client('unix:///tmp/tg.sck');
$contactList = $telegram->getContactList();
var_dump($contactList);
var_dump($telegram->msg($contactList[0], '"Te\'st"' . "\n" . time()));
<?php

/**
 * Copyright 2015 Eric Enold <*****@*****.**>
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
require 'vendor/autoload.php';
$telegram = new \Zyberspace\Telegram\Cli\Client('unix:///tmp/tg.sck');
$contactList = $telegram->getContactList();
var_dump($contactList);
var_dump($telegram->msg($contactList[0]->print_name, '"Te\'st"' . "\n" . time()));