Jump to content

include not displaying page


bftwofreak

Recommended Posts

Here's my script located on a module within my site.

<?php

/*=======================================================================
Nuke-Evolution Basic: Enhanced PHP-Nuke Web Portal System
=======================================================================*/

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

include("header.php");

$module_name = basename(dirname(__FILE__));

if (isset($_GET['tag'])) {
$tag = '?tag=' . $_GET['tag'];
}

OpenTable();

include('http://sig.halo3.updominon.com/index.php');

CloseTable();

include("footer.php");

?>

and here's the code to the http://sig.halo3.updominon.com/index.php. this page gets included to show it's echo contents.

<?php

define(BUNGIE, 'http://www.bungie.net');

include('dom.php');

if (isset($_GET['tag'])){
$tag = str_replace('%20','+',$_GET['tag']);
$tag = str_replace(' ','+',$tag);
$ptag = str_replace('%20', ' ', $_GET['tag']);
$ptag = str_replace('+', ' ', $ptag);

$dom = file_get_dom('http://www.bungie.net/Stats/Halo3/Default.aspx?player=' . $tag);

if ($dom->find('h1', 0)->innertext != 'Halo 3 Service Record Not Found') {
//Required
header('Content-type: image/gif');
mkdir($tag);
//image create
$end = imagecreate(450, 150)
 or die('Cannot Initialize new GD image stream');

//Background
$background_color = imagecolorallocate($end, 0, 0, 0);

//Rank
$rank = @imagecreatefromgif(BUNGIE . $dom->getElementById('ctl00_mainContent_identityStrip_imgRank')->src);
imagegif($rank, $tag . '/rank.gif');
imagedestroy($rank);

//Snapshot
$snapt = BUNGIE . $dom->getElementById('ctl00_mainContent_imgModel')->src;
$snapt = str_replace('&','&',$snapt);
$snap = imagecreatefromjpeg($snapt);
imagegif($snap, $tag . '/snapshot.gif');
imagedestroy($snap);
$snap = imagecreatefromgif($tag . '/snapshot.gif');
imagecopyresized($end,$snap,5,20,0,0,125,125,imagesx($snap),imagesy($snap));

//Emblem
$emblemt = BUNGIE . $dom->getElementById('ctl00_mainContent_identityStrip_EmblemCtrl_imgEmblem')->src;
$emblemt = str_replace('&','&',$emblemt);
$emblem = imagecreatefromjpeg($emblemt);
imagegif($emblem, $tag . '/emblem.gif');
imagedestroy($emblem);
$emblem = imagecreatefromgif($tag . '/emblem.gif');
imagecopy($end,$emblem,135,20,0,0,imagesx($emblem),imagesy($emblem));

//Gamertag and Service Tag
$stag = $dom->getElementById('ctl00_mainContent_identityStrip_lblServiceTag')->innertext;
$gt_color = imagecolorallocate($end, 233, 0, 0);
imagestring($end, 3, 5, 5, $ptag . ' - ' . $stag, $gt_color);

//image produce

imagegif($end, $tag . '/sig.gif');
imagedestroy($snap);
imagedestroy($end);
header('Content-type: text/html');
echo '<img src="http://sig.halo3.updominon.com/' . $tag . '/sig.gif" />';
} else {
echo '<div style="color: white;">Your Service Record was not Found<br />
<form action="?" method="get">
Insert Gamertag<input type="text" name="tag" />
<input type="submit" value="Submit" />
</form></div>';
}
} else {
echo '<div style="color: white;"><form action="?" method="get">
Insert Gamertag<input type="text" name="tag" />
<input type="submit" value="Submit" />
</form></div>';
}

?>

When I load my module, the page doesn't load... why? and does anyone know how to fix it?

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.