Contentify: Twitch Stream Screenshot

Created on 3 Aug 2017  路  6Comments  路  Source: Contentify/Contentify

Hello,
Sir i would like to know how to get twitch stream screen shot.

  1. I already set cronjob for https://pakfraggers.pk/jobs on every 5 minutes.
  2. I already insert the twitch api key in admin panel.
  3. I run the command for update vendors . php compose.phar install or update.
  4. Folder permissions is set on 777.

still i could not get the screenshot for twitch streams, Please Help me.

i would like to suggest about servers section that there should be a server status where the server is offline or online and how many players are playing.

Thanks

enhancement help wanted wontfix

All 6 comments

It has been fixed by adding new twitch stream i dont know how . Thanks anyway

i would like to suggest about servers section that there should be a server status where the server is offline or online and how many players are playing.

Good idea. Server on/offline is pretty easy, but detecting how many palyers are playing is not, because this would need an API that makes it possible to ask the server for such information. To much of a challenge right now. :P

for csgo server query you can use this script but it needs to be update every minute to get the current status of server and other details,

$ip = "216.52.148.47";
$port = "27015";

$socket = socket_create(AF_INET, SOCK_DGRAM, 0);
$result = socket_connect($socket, $ip, $port);

if($result < 0)
    echo "connect() failed.\nReason: ($result) \n";

$data = "\xFF\xFF\xFF\xFF\x54\x53\x6F\x75\x72\x63\x65\x20\x45\x6E\x67\x69\x6E\x65\x20\x51\x75\x65\x72\x79\x00";
socket_write($socket, $data, strlen($data));

$out = socket_read($socket, 4096);

$queryData         = explode("\x00", substr($out, 6), 5);

$server['name']        = $queryData[0];
$server['map']         = $queryData[1];
$server['game']        = $queryData[2];
$server['description'] = $queryData[3];
$packet                = $queryData[4];
$app_id                = array_pop(unpack("S", substr($packet, 0, 2)));
$server['players']     = ord(substr($packet, 2, 1));
$server['playersmax']  = ord(substr($packet, 3, 1));
$server['bots']        = ord(substr($packet, 4, 1));
$server['dedicated']   =     substr($packet, 5, 1);
$server['os']          =     substr($packet, 6, 1);
$server['password']    = ord(substr($packet, 7, 1));
$server['vac']         = ord(substr($packet, 8, 1));

var_dump($server) ;

I will take a look at it soon. :)

This issue has been automatically marked as stale, because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

This issue has been automatically closed, because it has not had recent activity.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bitbot-marina picture bitbot-marina  路  5Comments

justtam picture justtam  路  6Comments

niclasreich picture niclasreich  路  4Comments

kamohy picture kamohy  路  5Comments

andakawa picture andakawa  路  4Comments