Jump to content

[SOLVED] php if statement issue


bftwofreak

Recommended Posts

I'm trying to create a Halo 3 stats module on my site but to get the basics I use a readfile(); command, but people have to enter their gamertags in first.

<?php

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

define('INDEX_FILE', true);

$module_name = basename(dirname(__FILE__));



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

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

echo $file;

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

?>

You guys can say what you want about the CMS I use, but I need help with the if/else statement.

Link to comment
https://forums.phpfreaks.com/topic/116131-solved-php-if-statement-issue/
Share on other sites

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.