Convert PHP Scipt To A Block

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Convert PHP Scipt To A Block
frisp
CZ Newbie
frisp has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Dec 21, 2004
0.00 posts per day
Posts: 4
Points: 650
   
This one has me stupmed, trying to convert the following to a phpnuke block. Anyhelp may save the last of my hair/fingernails icon_biggrin.gif

<html>
<head>
<title>anVox Server Status</title>
<style type="text/css">
.listing { color: #000000; FONT-SIZE: 10px; FONT-FAMILY: verdana,arial,helvetica,sans-serif; }
.servername { color: #ffffff; FONT-SIZE: 14px; FONT-FAMILY: verdana,arial,helvetica,sans-serif; }
.serverdetail { color: #ffffff; FONT-SIZE: 10px; FONT-FAMILY: verdana,arial,helvetica,sans-serif; }
.serverdetail a:link, .serverdetail a:visited, .serverdetail a:active { color: #ffffff; text-decoration: none; }
.serverdetail a:hover { color: #ffffff; text-decoration: underline; }
</style>
</head>

<body>
<table align="left" border="0" cellpadding="0" cellspacing="0" width="400">
  <tr>
    <td>
<?
// Your anVox server IP
$server_ip="***.***.***.***";

// Your anVox server port
$server_port="****";

// Your server type: 1 = Teamspeak, 2 = Ventrilo
$server_type="2";

// Outside table color
$table_color1="556d8c";

// Inside table color
$table_color2="ededed";

// Data list table color
$table_color3="FFFFFF";

  // DO NOT EDIT THE LINE BELOW!!
@readfile("http://uk.status.anvox.net/status.php?detail=$server_ip&detailport=$server_port&server_type=$server_type&table_color1=$table_color1&table_color2=$table_color2&table_color3=$table_color3");
?>
          </td>
        </tr>
      </table>
<center><font size="-2" face="verdana">Hosted by <a href="http://www.anvox.com" target="_blank">www.anVox.com</a></font></center>
</body>
</html>


Running nuke 7.5

Regards

frisp


Back to top Reply with quote
#2   
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 45
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.06 posts per day
Posts: 8089
Points: 494,430
   
Try this one....



<?php
if (!defined('IN_NUKE')) { exit; }
$content = '
<style type="text/css">
.listing { color: #000000; FONT-SIZE: 10px; FONT-FAMILY: verdana,arial,helvetica,sans-serif; }
.servername { color: #ffffff; FONT-SIZE: 14px; FONT-FAMILY: verdana,arial,helvetica,sans-serif; }
.serverdetail { color: #ffffff; FONT-SIZE: 10px; FONT-FAMILY: verdana,arial,helvetica,sans-serif; }
.serverdetail a:link, .serverdetail a:visited, .serverdetail a:active { color: #ffffff; text-decoration: none; }
.serverdetail a:hover { color: #ffffff; text-decoration: underline; }
</style>
<table align="left" border="0" cellpadding="0" cellspacing="0" width="400">
  <tr>
    <td>';

// Your anVox server IP
$server_ip="***.***.***.***";

// Your anVox server port
$server_port="****";

// Your server type: 1 = Teamspeak, 2 = Ventrilo
$server_type="2";

// Outside table color
$table_color1="556d8c";

// Inside table color
$table_color2="ededed";

// Data list table color
$table_color3="FFFFFF";

  // DO NOT EDIT THE LINE BELOW!!
@readfile("http://uk.status.anvox.net/status.php?detail=$server_ip&detailport=$server_port&server_type=$server_type&table_color1=$table_color1&table_color2=$table_color2&table_color3=$table_color3");

$content .= '</td>
        </tr>
      </table>
<center><font size="-2" face="verdana">Hosted by <a href="http://www.anvox.com" target="_blank">www.anVox.com</a></font></center>';
?>




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: Convert PHP Scipt To A Block
frisp
CZ Newbie
frisp has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Dec 21, 2004
0.00 posts per day
Posts: 4
Points: 650
   
Thanks for the reply, actually did it differently. Placed ascipt in it's own folder in root, then created block this way.

<?php

if (eregi("block-Ventrilo.php",$PHP_SELF)) {
    Header("Location: index.php");
    die();
}
$content  .=  "<br><center><a href=\"http://www.anvox.com\" title=\"anvox\" target=\"_blank\">Hosted by [ Register or login to view links on this board. ]
ob_start();
include("Ventrilo/remote_server_status.php");
$output = ob_get_contents();
ob_end_clean();
$content = $output;
?>



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum