Jump to content

[SOLVED] hide the contents of file_get_contents();


bftwofreak

Recommended Posts

Like I posted earlier, I'm working on a script to display my member's halo 3 stats. I've currently accessed the file, but I'm trying to hide the contents of the file. This is what I'm currently using:

<?php

if (!defined('MODULE_FILE')) {
   die('You can\'t access this file directly...');
}

define('INDEX_FILE', true);

$module_name = basename(dirname(__FILE__));



$text = 'test...';

if (isset($_REQUEST['player'])) {
$url = 'http://www.bungie.net/stats/Halo3/default.aspx?player=' . $_REQUEST['player'];
$file = '<div style="visibility:hidden;">';
$file = file_get_contents($url);
$file .= '</div>';
$body = $text;
} else {
$url = 'tag.html';
$file = file_get_contents(NUKE_MODULES_DIR . $module_name . '/' . $url);
$body = '';
}

include('header.php');
OpenTable();

echo $file;

echo $body;

CloseTable();
include('footer.php');

?>

 

Is there an easier way to hide the text or another way because this isn't working.

oh ok. I get it now.. ha. the <div style="visibiliity: hidden;"> was overwritten by the get_file_contents(); command. got it. whoops... the only issue now is that it leaves this giant blank space where the page contents were... any way to get rid of that space?

lol sorry. It technically related to php so I posted it here, plus I didn't feel like waiting til next week while there's no one in the html forum, but I'll attempt it and if it doesn't work, I'll repost in the html or javascript forum. Thanks for the fix though.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.