Skip to content

Latest commit

 

History

History
122 lines (97 loc) · 3.25 KB

README.md

File metadata and controls

122 lines (97 loc) · 3.25 KB

Contributors Forks Stargazers Issues Hits


image

Twitch Api V1.0.0

twitch login, 2 factor login, follow/unfollow streamers, report inappropriate broadcasts and new features as the day progresses..
Feedback
Türkçe

About the project

Twitch login, 2 factor login, follow/unfollow streamers, report inappropriate broadcasts and new features as the day progresses..

Requirements

  • PHP 7.4 or higher

Using the repo by downloading

  1. This download script
  2. Edit test.php:8
  3. Run test.php

Examples

Login

<?php
session_start();
include("api.php");
$use = new tw();
$look = $use->login("TWITCH-USERNAME", "TWITCH-PASSWORD");
echo $look;

Two Factor Login

<?php
session_start();
include("api.php");
$use = new tw();
$use->auth = $_SESSION['authcode'];
$look = $use->login("TWITCH-USERNAME", "TWITCH-PASSWORD");
echo $look;
if(isset($_POST['codetoken'])){
	$check = $use->twofactor($_POST['codetoken'], $_POST['code']);
	echo $check;
}

Follow

<?php
session_start();
include("api.php");
$use = new tw();
$use->auth = $_SESSION['authcode'];
$use->follow("wtcn");

Unfollow

<?php
session_start();
include("api.php");
$use = new tw();
$use->auth = $_SESSION['authcode'];
$use->unfollow("wtcn");

Info

<?php
session_start();
include("api.php");
$use = new tw();
$use->auth = $_SESSION['authcode'];
$info = $use->getInfo("wtcn");
//0 = bio , 1 = username, 2 = pplink, 3 = offline pp, 4 = viewcount, 5 = Create Date, 6 = display name
$a = explode("`", $info);
echo '<img src="'.$a[3].'"/>';

Report Streamer

<?php
session_start();
include("api.php");
$use = new tw();
$use->auth = $_SESSION['authcode'];
$use->report("reason for report", "StreamerUsername");