bftwofreak Posted November 4, 2008 Share Posted November 4, 2008 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? Quote Link to comment Share on other sites More sharing options...
bftwofreak Posted November 4, 2008 Author Share Posted November 4, 2008 bump Quote Link to comment Share on other sites More sharing options...
.josh Posted November 4, 2008 Share Posted November 4, 2008 Turn on your error reporting, you will at least find that you are sending headers when you already sent output. Quote Link to comment Share on other sites More sharing options...
bftwofreak Posted November 4, 2008 Author Share Posted November 4, 2008 I don't quite get what you mean... Quote Link to comment Share on other sites More sharing options...
DeanWhitehouse Posted November 4, 2008 Share Posted November 4, 2008 error_reporting(E_ALL); and there is some php.ini one i cant remeber . Quote Link to comment Share on other sites More sharing options...
bftwofreak Posted November 4, 2008 Author Share Posted November 4, 2008 I understand the error reporting even though it didn't show me anything... but I don't get what he means with the headers... I understand that I'm using two different content types, but how is that a problem? Quote Link to comment Share on other sites More sharing options...
DeanWhitehouse Posted November 4, 2008 Share Posted November 4, 2008 i don't think you can use two different header types, there is no logical reason to need to, rethink your code logic. Quote Link to comment Share on other sites More sharing options...
bftwofreak Posted November 4, 2008 Author Share Posted November 4, 2008 well it works if you go to sig.halo3.updominon.com/index.php, the code works, but I'll eliminate the text and see what happens... Quote Link to comment Share on other sites More sharing options...
DeanWhitehouse Posted November 4, 2008 Share Posted November 4, 2008 Lol, no it doesn't it says no input file specified. Maybe check your site now and then ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.