28.06.2009, 09:16
i have no knoledge of php or anything like that.
how would i open samp.bans and show it on a website?
how would i open samp.bans and show it on a website?

<?php $file = "samp.ban"; $handle = fopen($file, 'r'); $data = fread($handle, filesize($file)); fclose($handle); echo nl2br($data); ?>

<form action="bans.php" method="post">
Search:
<input type="text" name="keyword">
<input type="submit" name="search">
</form>
<?php
$keyword = $_POST['keyword'];
if(isset($_POST[search]) == null)
{
$file = "samp.ban";
$handle = fopen($file, 'r');
$data = fread($handle, filesize($file));
fclose($handle);
echo nl2br($data);
}
else
{
$file = "samp.ban";
$handle = fopen($file, 'r');
$data = fread($handle, filesize($file));
fclose($handle);
$line = explode("<br />", nl2br($data));
$limit = count($line) - 1;
$i = 0;
while($i != $limit)
{
$find = strpos($line[$i], $keyword);
if($find != false)
{echo $line[$i].'<br>';}
$i++;
}
}
?>
|
Originally Posted by andersffs
Well it's easy made with PHP.. I'll see what I can do
![]() edit: Here you got! Change the "samp.ban" to the exact source. Код:
<?php $file = "samp.ban"; $handle = fopen($file, 'r'); $data = fread($handle, filesize($file)); fclose($handle); echo nl2br($data); ?> |
<?php
$conn = ftp_connect("your servers ftp address here") or die("Could not connect");
ftp_login($conn,"user ftp login"," user password login");
ftp_get($conn,"samp.ban","directory/file where samp.ban is located on your ftp",FTP_ASCII);
$file = "samp.ban";
$handle = fopen($file, 'r');
$data = fread($handle, filesize($file));
fclose($handle);
ftp_close($conn);
echo nl2br($data);
?>