TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,964
  • Latest: stylix
Stats
  • Total Posts: 195,965
  • Total Topics: 21,317
  • Online today: 2,114
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online

Block PHP Error

Started by Akilae, March 08, 2007, 06:22:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Akilae

Hey guys.  I was searching for block code to display my ventrilo server status and I found one but i'm getting errors.  This is the code I'm putting using a php block:


<?php
/*********************************************************************************\
| PHP-Nuke Block: Ventrilospy.net (block-VentriloSpy.php)                         |
| Copyright(c) 2006 ChrisWell - chriswell@kyoss.net - http://www.ventrilospy.net  |             
\*********************************************************************************/

//SETTINGS
//_________________________________________________________________________________
// Please check the codegenerator at http://www.ventrilospy.net/code/index.html for the values
$VSPY_IP "defend.typefrag.com"//your servers ip-address
$VSPY_PORT "14814"//default is 3784

$VSPY_WIDTH 600;
$VSPY_HEIGHT 400;
$VSPY_STYLE $VSPY_WIDTH.'x'.$VSPY_HEIGHT.'_html';

//DO NOT CHANGE ANYTHING BELOW THIS LINE
//_________________________________________________________________________________
if (eregi("block-VentriloSpy.php"$PHP_SELF)) {
    
Header("Location: index.php");
    die();
//PROTECTION

//CONTENT
$content '<div style="text-align:center;"><script language="javascript" type="text/javascript">
   var vspy_width='
.$VSPY_WIDTH.';
   var vspy_height='
.$VSPY_HEIGHT.';
   var vspy_style="'
.$VSPY_STYLE.'";
   var vspy_server="'
.$VSPY_IP.':'.$VSPY_PORT.'";
</script>
<script language="javascript" type="text/javascript" src="http://www.ventrilospy.net/js/show_ventrilo.js"></script></div>'
;

?>



And this is the error I get:


Parse error: parse error, unexpected '<' in /home/www/artofwarcraftguild.com/Sources/Load.php(1735) : eval()'d code(36) : eval()'d code on line 1


Any help?

IchBin

There's already one located in the block code snippets board. Just remember any time you put PHP code into a block you have to take out the <?php and ?> tags.

This website is proudly hosted on Crocweb Cloud Website Hosting.