SimplePortal

Support => International Support => Polish => Topic started by: cieplutki on January 03, 2016, 01:47:08 PM

Title: kod php w bloku
Post by: cieplutki on January 03, 2016, 01:47:08 PM
Witam,
potrzebuję zwielokrotnić ten kod php tak by pokazywał kilka lub kilkanaście "hubów"
Code: [Select]
<?php
// A PHP comment.

// A function:
function hub()
{
$hub[] = "imperium1.pl:1234" ;
for( $a $a count$hub ) ; $a++ )
{
$ent explode":"$hub[$a] ) ;
$adres $ent[0] ;
$port $ent[1] ;
$fp = @fsockopen($adres$port$errno$errstr5);
if ($fp) {
echo '<img src="http://dcmaniak.com.pl/images/hubon.gif" alt="On-Line" title="HUB ON-Line " border="0" /><br />';
} else {
echo '<img src="http://dcmaniak.com.pl/images/huboff.gif" alt="Off-Line" title="HUB OFF-Line " border="0" /><br />';
}
}
      
// Some HTML
      
echo 'Hub: <b>Imperium</b>';
}
return 
hub();
?>
Ten działa na pojedynczy hub jak dodać w php kolejne
Title: Re: kod php w bloku
Post by: ♦ Ninja ZX-10RR ♦ on January 08, 2016, 06:29:54 AM
http://simpleportal.net/index.php?topic=14227.0
SimplePortal 2.3.8 © 2008-2024, SimplePortal