T
T
Tutucu2020-12-12 11:24:04
Laravel
Tutucu, 2020-12-12 11:24:04

How to make a bot in Laravel Echo Server (Web sockets, broadcasting)?

Hello! I have an online game that uses Laravel backend and websockets (Laravel Echo Server). I need to create a bot that will impersonate a player and thus keep online when there are few people.
What should he do:

  • Enter the PresenceChannel ( presence channel ) - I don’t know how to do this
  • Depict various actions using ajax - I know how to do this
  • Leave the channel - I don't know either

Those. I understand how to do the behavior of the bot itself, but I don’t know how and I can’t find on the Internet how to programmatically connect to Laravel Echo Server channels via php and server requests, integration via Socket.IO or Pusher is everywhere, but I need it directly via php without JS . Does anyone have any ideas? Or at least thoughts on how to form a request to Google?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alex Wells, 2020-12-12
@Alex_Wells

Laravel Echo is a JavaScript library

Under the hood, echo still has a pusher. Client libs for pusher are publicly available - choose any and use it.

S
Serj-One, 2016-12-27
@ZetIndex_Ram

Re-read it again.

The block must not affect its environment

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question