🔒 Closed Telethon in php

Status
Not open for further replies.

PHC_Jayvee

nakatapos din sa research😂🤣
Hello po mga paps tanong ko Lang if pwede mag message sa telegram using php

Yung katulad po NG telethon sa python

May script po Kasi ako para sa auto claim sa telegram using python Kaso lagi ako na flood error Kaya na isip ko Kung pwede sa php
 
anong library pala gamit mo dun idol kung natatandaan mo pa?
Na snipe ko

Python:
import asyncio
import logging
import re
import time
import os
import sys
import requests
from time import sleep

from telethon import TelegramClient, sync, events
from telethon.tl.functions.messages import GetHistoryRequest, GetBotCallbackAnswerRequest
from telethon.errors import SessionPasswordNeededError
from bs4 import BeautifulSoup
from time import sleep
import requests, json, re, sys, os
import colorama
from colorama import Fore, Back, Style
from datetime import datetime

try:
   import colorama
   from colorama import Fore, Back, Style
   colorama.init(autoreset=True)
   hijau = Style.RESET_ALL+Style.BRIGHT+Fore.GREEN
   res = Style.RESET_ALL
   abu2 = Style.DIM+Fore.WHITE
   biru = Style.RESET_ALL+Style.BRIGHT+Fore.BLUE
   ungu2 = Style.NORMAL+Fore.MAGENTA
   ungu = Style.RESET_ALL+Style.BRIGHT+Fore.MAGENTA
   hijau2 = Style.NORMAL+Fore.GREEN
   yellow2 = Style.NORMAL+Fore.YELLOW
   yellow = Style.RESET_ALL+Style.BRIGHT+Fore.YELLOW
   red2 = Style.NORMAL+Fore.RED
   red = Style.RESET_ALL+Style.BRIGHT+Fore.RED
   cyan = Style.BRIGHT+Fore.CYAN
   cyan2 = Style.NORMAL+Fore.CYAN
   des = Style.BRIGHT+Fore.GREEN+"『🔥』"
   kur1 = Style.BRIGHT+Fore.RED+"["
   kur2 = Style.BRIGHT+Fore.RED+"]"
except:
   print ("Please Install Modul Colorama!!\n\n\n")
   sys.exit()
os.system('cls' if os.name=='nt' else 'clear')
    
banner = """ \033[1;33m                 
\033[1;32m
==========================================
Brought to you by Kupengpat [PHC❤️PAYAMAN]
==========================================

"""
print(banner)
if not os.path.exists('session'):
    os.makedirs('session')

api_id = '974754'
api_hash = '6295657bbae725bfe8dfcca5d9e323e6'
phone_number = sys.argv[1]

    # Check if phone number is not specified
if len(sys.argv) < 2:
 print('Usage: python doge.py phone_number')
 print('-> Input number in international format (example: +639162995600)\n')
 e = input('Press any key to exit...')
 exit(1)
        
    

    # Connect to client
client = TelegramClient('session/' + phone_number, api_id, api_hash)
client.start(phone_number)
me = client.get_me()

print(hijau+ f'Welcome {me.first_name}\n'+ Fore.RESET)


print(cyan+ f'USERNAME : {me.username}')
print(cyan+ f'Number : ({phone_number})\n')


def tunggu(x):
      sys.stdout.write("\r")
      sys.stdout.write("                                                               ")
      for remaining in range(x, 0, -1):
          sys.stdout.write("\r")
          sys.stdout.write("{}[{}|{}]{} {:2d} {}seconds remaining".format(abu2, yellow2, abu2, res, remaining, hijau))
          sys.stdout.flush()
          sleep(0.125)
          sys.stdout.write("\r")
          sys.stdout.write("{}[{}/{}]{} {:2d} {}seconds remaining".format(abu2, yellow2, abu2, res, remaining, hijau))
          sys.stdout.flush()
          sleep(0.125)
          sys.stdout.write("\r")
          sys.stdout.write("{}[{}-{}]{} {:2d}{} seconds remaining".format(abu2, yellow2, abu2, res, remaining, hijau))
          sys.stdout.flush()
          sleep(0.125)
          sys.stdout.write("\r")
          sys.stdout.write("{}[{}\{}]{} {:2d}{} seconds remaining".format(abu2, yellow2, abu2, res, remaining, hijau))
          sys.stdout.flush()
          sleep(0.125)
          sys.stdout.write("\r")
          sys.stdout.write("{}[{}|{}]{} {:2d}{} seconds remaining".format(abu2, yellow2, abu2, res, remaining, hijau))
          sys.stdout.flush()
          sleep(0.125)
          sys.stdout.write("\r")
          sys.stdout.write("{}[{}/{}]{} {:2d} {}seconds remaining".format(abu2, yellow2, abu2, res, remaining, hijau))
          sys.stdout.flush()
          sleep(0.125)
          sys.stdout.write("\r")
          sys.stdout.write("{}[{}-{}]{} {:2d} {}seconds remaining".format(abu2, yellow2, abu2, res, remaining, hijau))
          sys.stdout.flush()
          sleep(0.125)
          sys.stdout.write("\r")
          sys.stdout.write("{}[{}\{}]{} {:2d}{} seconds remaining".format(abu2, yellow2, abu2, res, remaining, hijau))
          sys.stdout.flush()
          sleep(0.125)


channel_entity = client.get_entity("@DOGE_Time_Faucet_bot")
channel_username = "@DOGE_Time_Faucet_bot"

def tunggu(x):
    sys.stdout.write("\r")
    sys.stdout.write("                                                               ")
    for remaining in range(x, 0, -1):
       sys.stdout.write("\r")
       sys.stdout.write("\033[1;30m[\033[1;32m+\033[1;30m]\033[1;0m{:2d} \033[1;32mseconds remaining".format(remaining))
       sys.stdout.flush()
       sleep(1)
def claim1():
    sys.stdout.write('\r                                                                 \r')
    sys.stdout.write(f"\r{abu2}[{yellow2}!{abu2}]{yellow} Claiming Bonus")
    sys.stdout.flush()
    sleep(2)
    client.send_message(entity=channel_entity, message=" 🎁 Claim Bonus ")
    
    sys.stdout.write('\r                                                                 \r')
    sys.stdout.write(f"\r{abu2}[{yellow2}!{abu2}]{yellow} You Got Reward!")
    sleep(3)
        
    message_history = client(GetHistoryRequest(peer=channel_entity,limit=2,offset_date=None,offset_id=0,max_id=0,min_id=0,add_offset=0,hash=0))
    channel_id = message_history.messages[1].id
    if message_history.messages[1].message.find('You') != -1:
       sys.stdout.write("\r\033[1;30m[\033[1;32m+\033[1;30m] \033[1;32mYou get a bonus 0.011 DOGE\n")
       tunggu(int(64))
        
    message_history = client(GetHistoryRequest(peer=channel_entity,limit=1,offset_date=None,offset_id=0,max_id=0,min_id=0,add_offset=0,hash=0))
    channel_id = message_history.messages[0].id
    if message_history.messages[0].message.find("You have ") != -1:
       sys.stdout.write("\r\033[1;30m[\033[1;33m!\033[1;30m] \033[1;33mYou have already received --- Doge \n")
       tunggu(int(15))
        
    
        
    
    
for i in range(5000000):
    claim1()
    t = 0   
    tunggu(t)
 
Status
Not open for further replies.

About this Thread

  • 5
    Replies
  • 744
    Views
  • 2
    Participants
Last reply from:
PHC_Jayvee

Online now

Members online
1,092
Guests online
931
Total visitors
2,023

Forum statistics

Threads
2,277,028
Posts
28,973,795
Members
1,229,690
Latest member
ravendc1107
Back
Top