PHP - Excepccion no detectada

 
Vista:
sin imagen de perfil

Excepccion no detectada

Publicado por cristian (9 intervenciones) el 26/04/2014 18:23:24
Estaba haciendo una lista de servidores de minecraft dede una api y cuando abro el index.php me da error
especificamente me dice excepcion no detectada y no se solucionarlo


este es el link de la pagina: http://urltuenti.xtrweb.com/phpservermc/demo/

se ageadece muchisimo la ayuda
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de xve
Val: 3.943
Oro
Ha mantenido su posición en PHP (en relación al último mes)
Gráfica de PHP

Excepccion no detectada

Publicado por xve (6935 intervenciones) el 27/04/2014 11:28:54
Hola Cristian, este es tu error:
Fatal error: Uncaught exception 'Minecraft\st' with message 'Could not connect to the Minecraft server.' in /home/u674467552/public_html/phpservermc/MCServerStatus/Minecraft/Stats.php:12 Stack trace: #0 /home/u674467552/public_html/phpservermc/demo/index.php(42): Minecraft\Stats::retrieve(Object(Minecraft\Server)) #1 {main} thrown in /home/u674467552/public_html/phpservermc/MCServerStatus/Minecraft/Stats.php on line 12

No se muy bien que hay en la linea 12, pero no se puede conectar con el servidor de Minecraft...

Nos puedes mostrar el código para que que puede estar pasando?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

Excepccion no detectada

Publicado por cristian (9 intervenciones) el 27/04/2014 15:18:50
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
 
// Autoloader. Use SPL in a real project.
foreach(array('Server', 'Stats', 'StatsException') as $file) {
	include sprintf('../MCServerStatus/Minecraft/%s.php', $file);
}
 
$servers = array(
	"s.nerd.nu",
	"p.nerd.nu",
	"hardcore.hcsmp.com",
	"theverge.game.nfoservers.com:25565",
);
 
?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<title>Minecraft Server Status</title>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
	<style>tr td,tr th {text-align:center !important}tr td.motd,tr th.motd{text-align:left !important;}</style>
	<style>.status{width:50px;}</style>
	<!-- HTML5 shim -->
    <!--[if lt IE 9]>
    	<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
</head>
<body>
	<div class="container">
		<div class="row" style="margin:15px 0;">
			<h1>MCServerStatus</h1>
			<p>This is a basic implementation of reading Minecraft server meta and online/offline status.</p>
		</div>
		<div class="row">
			<table class="table table-bordered table-striped">
				<thead>
					<tr>
						<th class="status">Status</th>
						<th class="motd">Server</th>
						<th>Players</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach($servers as $server): ?>
					<?php $stats = \Minecraft\Stats::retrieve(new \Minecraft\Server($server)); ?>
					<tr>
						<td>
							<?php if($stats->is_online): ?>
							<span class="badge badge-success"><i class="icon-ok icon-white"></i></span>
							<?php else: ?>
							<span class="badge badge-important"><i class="icon-remove icon-white"></i></span>
							<?php endif; ?>
						</td>
						<td class="motd"><?php echo $stats->motd; ?> <code><?php echo $server; ?></code></td>
						<td><?php printf('%u/%u', $stats->online_players, $stats->max_players); ?></td>
					</tr>
					<?php unset($stats); ?>
					<?php endforeach; ?>
				</tbody>
			</table>
		</div>
		<div class="row">
			<p>This page is using PHP to check if Minecraft servers are online and query their listing information. <a href="http://www.webmaster-source.com/?p=4730">Read more about redwallhp's original PHP 5.2 implementation here.</a></p>
			<iframe src="http://ghbtns.com/github-btn.html?user=redwallhp&repo=MCServerStatus&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20"></iframe>
			<iframe src="http://ghbtns.com/github-btn.html?user=redwallhp&repo=MCServerStatus&type=fork&count=true"allowtransparency="true" frameborder="0" scrolling="0" width="95" height="20"></iframe>
		</div>
	</div>
</body>
</html>



es un archivo php con codigo html pero no entiendo el error
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar