Git Product home page Git Product logo

php-telegram-cli-client's People

Contributors

sikifn avatar yorch81 avatar zyberspace avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-telegram-cli-client's Issues

telegram-cli crash when received invalid command

I tried to send this

$telegram->exec('msg "user#id81958936" "hei"');

user id shouldnt be put into quote, so telegram-cli dies. Is it normal?
This mean that telegram will crash if received invalid command right?

Copy message from other channel

Hi
Sorry,I have a question about your project(telegram).
Can I get the message channels that I'm not their admin?
I want write a script that read message from other chanel and write to
my chanel.
I can do it?
best regards
thanks

create_group_chat

Hello are you able to add create_group_chat as a command via php?

Installation

Hi,
while running this script " ./bin/telegram-cli --json -dWS /tmp/tg.sck & " in cmd Windows pc
i got
er
would please tell me where im wrong ?

socket to connect

hi

i don't understand!!

i want send massage to telegram.

$telegram = new \Zyberspace\Telegram\Cli\Client('unix:///tmp/tg.sck');

what is 'unix:///tmp/tg.sck' ?

how active it in windows(local host) or linux server?

how active my phone number on this telegram client?!

addContact() failed on 32bit version of php --> 32bit's INT value limit.

The addContact() method parses $phoneNumber to integer.
On 32bit version of php, problem will occur when receiving 11 or 12 character of number (e.g. 6212345678901, typical phone number nowadays usually consists up to 11 or 12 character).

I know this is not a big problem and can just be resolved by using 64bit version of php, but if there's a workaround to 32bit php it would be super awesome ๐Ÿ‘ .

problem in load photo

Hi
I added this function in Client.php class for downloading images.

public function getImage($messageId)
{
        return $this->exec('load_photo '.$messageId);
}

but I have a problem when I want to download images .it usually returned false and sometimes returned true with this json file and downloaded file. I do not know why it happens and I could not download

{
  "result": "~/.telegram-cli/downloads/download_434226810_148633.jpg"
  "event": "download"
}

the size of photos are about 74 KB . for example when I wanted to download 5 photos I called getImage without any interval.
what is the problem ?? Who can help me??

problem in getContactList()

hey dude .
when i use getContactList() it's return NULL to me , i can't understand why . !
i even use your exmaple file , it's return null to

NULL
PHP Notice:  Trying to get property of non-object in /root/php-discovery-shell-master/example.php on line 13

it's point to this line
var_dump($telegram->msg($contactList[0], '"Te\'st"' . "\n" . time()));

when i just have one contact in my contacts list , everything is ok, but when i have more contacts it's return null , please check script again

change_user_group: can't find the user telegramd to switch to bind: Address already in use

Hello,

I just seen your API today and tried to install it. I placed your files on dedicated server and used this command:
tg/bin/telegram-cli --json -dWS /tmp/tg.sck &
[1] 13619
[root@serverName httpdocs]# change_user_group: can't find the user telegramd to switch to
bind: Address already in use

Why its displaying message "bind: Address already in use"

Best regards

Installation Issues

Hi ,

I am trying to install in Centos 6.6 with PHP version 5.3.3 and am facing the following issue

composer require zyberspace/telegram-cli-client
Using version ^0.3.0 for zyberspace/telegram-cli-client
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for zyberspace/telegram-cli-client dev-master -> satisfiable by zyberspace/telegram-cli-client[dev-master].
- Can only install one of: zyberspace/telegram-cli-client[v0.3.0, dev-master].
- Installation request for zyberspace/telegram-cli-client ^0.3.0 -> satisfiable by zyberspace/telegram-cli-client[v0.3.0].

Installation failed, reverting ./composer.json to its original content.

It dosen't work ..

Hi ,

Thank you for amazing classes to use tg with PHP

I am using it but dosn't work, I use (Ubuntu ) , also I use Telegram-cli and it is works fine.

I opened the terminal and print: ./bin/telegram-cli -dWS /tmp/tg.sck & ( reurned this: [3] 10809 ).

then I installed (php-telegram-cli-client) by composer , create a new index.php file and use same example code.

but when I try to run file , dosn't happen , no return data.

Installing Error on ./configure

i think my python is not right

my os:
Ubuntu 15.04 64bit Desktop on VMWARE
memory: 3GB

my log:
root@ubuntu:/var/www/Telegram/tg# ./configure

checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for sqrt in -lm... yes
checking for library containing clock_gettime... none required
checking for library containing backtrace... none required
checking for event_base_new in -levent... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking event2/event.h usability... yes
checking event2/event.h presence... yes
checking for event2/event.h... yes
checking for pkg-config... /usr/bin/pkg-config
checking whether compiling and linking against OpenSSL works... yes
checking if zlib is wanted... yes
checking for inflateEnd in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for rl_save_prompt in -lreadline... yes
checking for libconfig... enabled
checking for config_init in -lconfig... yes
checking for liblua... enabled
checking for lua... /usr/bin/lua
checking if /usr/bin/lua is a Lua interpreter... yes
checking for lua version... 5.2
checking for lua platform... unknown
checking for lua script directory... ${prefix}/share/lua/5.2
checking for lua module directory... ${exec_prefix}/lib/lua/5.2
checking if LUA_VERSION is defined... yes
checking lua.h usability... no
checking lua.h presence... no
checking for lua.h... no
checking lualib.h usability... no
checking lualib.h presence... no
checking for lualib.h... no
checking lauxlib.h usability... no
checking lauxlib.h presence... no
checking for lauxlib.h... no
checking luaconf.h usability... no
checking luaconf.h presence... no
checking for luaconf.h... no
checking for Lua headers in... /usr/include/lua5.2
checking lua.h usability... yes
checking lua.h presence... yes
checking for lua.h... yes
checking lualib.h usability... yes
checking lualib.h presence... yes
checking for lualib.h... yes
checking lauxlib.h usability... yes
checking lauxlib.h presence... yes
checking for lauxlib.h... yes
checking luaconf.h usability... yes
checking luaconf.h presence... yes
checking for luaconf.h... yes
checking for Lua header version... 5.2
checking if Lua header version matches 5.2... yes
checking if LUA_VERSION is defined... yes
checking for library containing exp... none required
checking for library containing dlopen... -ldl
checking for library containing lua_load... -llua5.2
checking for python... enabled
checking for python build information...
checking for python3.4... python3.4
checking for main in -lpython3.4... no
checking for main in -lpython3.4m... no
checking for main in -lpython3.4mu... no
checking for python3.3... no
checking for python3.2... no
checking for python3.1... no
checking for python3... python3
checking for main in -lpython3... no
checking for main in -lpython3m... no
checking for main in -lpython3mu... no
checking for python2.7... python2.7
checking for main in -lpython2.7... yes
results of the Python check:
Binary: python2.7
Library: python2.7
Include Dir: /usr/include/python2.7
checking for libjansson... enabled
checking for json_array_set_new in -ljansson... yes
checking progname... default
checking execinfo.h usability... yes
checking execinfo.h presence... yes
checking for execinfo.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking mach/mach.h usability... no
checking mach/mach.h presence... no
checking for mach/mach.h... no
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for inline... inline
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for alarm... yes
checking for endpwent... yes
checking for memset... yes
checking for memmove... yes
checking for mkdir... yes
checking for select... yes
checking for socket... yes
checking for strdup... yes
checking for strndup... yes
checking for uname... yes
checking for __builtin_bswap32... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged

root@ubuntu:/var/www/Telegram/tg# make
make: *** No rule to make target 'tgl/scheme.tl', needed by 'auto/scheme.tl'. Stop.

Channels

Hi,
First of all I have to thank you for this developing such great PHP package. I have a question:
Is there any functions in order to work with channels? For example getting the list of your channels or posting on them or most importantly accessing your channel's member list?
Thank you very much.

500 internal error in browser?

I installed this package and did all of the specified steps.
But the running Example.php displays 500 internal error.

Whats happened?
Whats wrong?
How could i fix this?

Setting api_id and api_ahsh manually

How can I login to api set manually , perhaps someone will send sample code for sending a simple text message including a connection to the api , please help me

Download Image

Hi,
is it possible to download the received image from others ?

Channels support

There are a lot of features in Telegram CLI, which are not supported in Telegram Bot API (and not sure if ever will). One of them is channels support. So this project is still highly useful for developers ๐Ÿ˜‰

I am successfully using your lib for interacting with channels. Should i PR?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.