Jump to content

dragongamer

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Everything posted by dragongamer

  1. yes but it produces it as an image, http://www.meteox.com/images.aspx?jaar=-3&voor=&soort=loop3uur&c=uk&n= if you view it with FF it says its a gif file.
  2. hi i want to load an aspx image from a another site to, my own the onlu proplem is that php will not support it, i looked at the image source code to find out [code]<b>Warning</b>:  imagecreatefromgif(): Circular redirect, aborting. in <b>****/weather/radimg.php</b> on line <b>6</b><br /> <br /> <b>Warning</b>:  imagecreatefromgif(http://www.meteox.com/images.aspx?jaar=-3&voor=&soort=loop3uur&c=uk&n=): failed to open stream: Success in <b>****/weather/radimg.php</b> on line <b>6</b><br /> <br /> <b>Warning</b>:  imagepng(): supplied argument is not a valid Image resource in <b>****/weather/radimg.php</b> on line <b>10</b><br /> <br /> <b>Warning</b>:  imagedestroy(): supplied argument is not a valid Image resource in <b>*****/weather/radimg.php</b> on line <b>12</b><br /> [/code] i know i can load images form other domains because i tryed the script to load another image from another site it works fine its just it wont load images that are not, gif in the end,  [b]i know the aspx is an gif[/b], due to the headers outputed by it so is there a work around?
  3. ima trying to create a way of dispalying a percantage of how long some thing has ran for, we have the time its starts at and how long its on for in minutes, when i do try to use it it outputs  54, also i need to find a way of making it to show a percentage, by wotking out how many mintues has been on so far, then with the total time of it. [code]for($i = 0; $i < 6; $i++){ $string = str_replace('new wbl_pr( "', ' ', $WeatherFields[0][$i]); $string = ereg_replace('["]', '', $string); $pieces = explode(",", $string); echo $pieces[0]." ".$pieces[3]." ".$pieces[2]."mins<br>"; $stime = explode(" ", $pieces[1]);// trying to get the start time $finish=$stime[1]+$pieces[2];// start time plus how long the programe is in minutes echo $finish; }[/code] http://webzine.dragongamer.net/modules.php?name=TV has the the information on it. thanks  ;)
  4. hi, i have a xml file that i need to be prahsed, via php's 5 simplexml_load_file, the only problem is that i need to get the atraibues, E.G [code]->foo['OMG'][/code] but the line that has the data is [code]<yweather:condition text="Fair" code="34" temp="64" date="Thu, 24 Aug 2006 6:50 pm BST" />[/code] and if i try [code]$xml->channel->item->yweather:condition['code'];[/code] i simply get [quote]Parse error: syntax error, unexpected ':', expecting ',' or ';'[/quote] is there a work around or very simple fix for this?
  5. ohh do you know of a php script that can genarate the time you have been on a cetian page?
  6. ok i want to make it so i can insert the time some one spent on a page in to a mysql data base the code i have is [code]  <script  language="javascript"  type="text/javascript">       <!-- Begin pageOpen = new Date(); function bye() { pageClose = new Date(); minutes = (pageClose.getMinutes() - pageOpen.getMinutes()); seconds = (pageClose.getSeconds() - pageOpen.getSeconds()); time = (seconds + (minutes * 60)); if (time == 1) { time = (time + " second"); } else { time = (time + " seconds");    } alert('It has been ' + time + '.  '); } window.onunload = bye; // End --> </script>[/code] how can i turn the java var ' + time + ' and make it into a in a $statment.
  7. do you have and example, i am aming for 3 columes and 10 rows for each page.
  8. i have a script that shows a reslut every line e.g |----------| | a | |----------| |----------| | b | |----------| how can i make it so it shows more that one line e.g |---------| |--------| | a | | b | |---------| |--------| have seached over the net and not found anything if anybody knows of a tut or code spipet or exaple.
  9. ok in stead of the copy function i now placed move_uploaded_file now i get a different error [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Warning: move_uploaded_file(games/1.swf): failed to open stream: No such file or directory in /mounted-storage/home15a/sub003/sc17688-TROC/www/modules/Flash_Games/submit_code.php on line 41 Warning: move_uploaded_file(): Unable to move '/tmp/phpTgIKlG' to 'games/1.swf' in /mounted-storage/home15a/sub003/sc17688-TROC/www/modules/Flash_Games/submit_code.php on line 41 Warning: move_uploaded_file(images/screenshot/2nd.gif): failed to open stream: No such file or directory in /mounted-storage/home15a/sub003/sc17688-TROC/www/modules/Flash_Games/submit_code.php on line 44 Warning: move_uploaded_file(): Unable to move '/tmp/phpb6n6UL' to 'images/screenshot/2nd.gif' in /mounted-storage/home15a/sub003/sc17688-TROC/www/modules/Flash_Games/submit_code.php on line 44[/quote]
  10. yep both dir have been chmoded to 777, i was thinking it may be to due to the temp dir in the php script?
  11. ok using php form gen and making some changes i am just left with one proplem, when i enter the data then post it it says, [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] Warning: copy(games/1.swf): failed to open stream: No such file or directory in /mounted-storage/home15a/sub003/sc17688-TROC/www/modules/Flash_Games/submit_code.php on line 41 Warning: copy(images/screenshot/2nd.gif): failed to open stream: No such file or directory in /mounted-storage/home15a/sub003/sc17688-TROC/www/modules/Flash_Games/submit_code.php on line 44[/quote] ok here is the code [code]<?php if(!defined('MODULE_FILE')) {   header("Location: ../../index.php");   exit; } require_once("mainfile.php"); $module_name = basename(dirname(__FILE__)); get_lang($module_name); include("header.php"); $index = 1; OpenTable(); include("global.inc.php"); $errors=0; $error="The following errors occured while processing your form input.<ul>"; pt_register('POST','gamename'); $gamefile=$HTTP_POST_FILES['gamefile']; $gameimagefile=$HTTP_POST_FILES['gameimagefile']; pt_register('POST','description'); $description=preg_replace("/(\015\012)|(\015)|(\012)/","&nbsp;<br />", $description);pt_register('POST','authorsname'); pt_register('POST','authorssite'); pt_register('POST','hightpx'); pt_register('POST','widthpx'); pt_register('POST','backroundcolor'); if($gamename=="" || $gamefile=="" || $gameimagefile=="" || $description=="" || $hightpx=="" || $widthpx=="" || $backroundcolor=="" ){ $errors=1; $error.="<li>You did not enter one or more of the required fields. Please go back and try again."; } if(!is_uploaded_file($HTTP_POST_FILES['gamefile']['tmp_name'])){ $error.="<li>The file, ".$HTTP_POST_FILES['gamefile']['name'].", was not uploaded!"; $errors=1; } if(!is_uploaded_file($HTTP_POST_FILES['gameimagefile']['tmp_name'])){ $error.="<li>The file, ".$HTTP_POST_FILES['gameimagefile']['name'].", was not uploaded!"; $errors=1; } if($errors==1) echo $error; else{ $image_part = $HTTP_POST_FILES['gamefile']['name']; $image_list[1] = $image_part; copy($HTTP_POST_FILES['gamefile']['tmp_name'], "games/".$image_part); $image_part = $HTTP_POST_FILES['gameimagefile']['name']; $image_list[2] = $image_part; copy($HTTP_POST_FILES['gameimagefile']['tmp_name'], "images/screenshot/".$image_part); $where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/")); $gcid=10; $link = mysql_connect("**********","********","*******"); mysql_select_db("********",$link); $query="insert into nuke_flashgames_games (gcid,gname,gfilename,gimage,gdescription,gauthorname,gauthorurl,gheight,gwidth,gcolor) values ('".$gcid."','".$gamename."','".$image_list[1]."','".$image_list[2]."','".$description."','".$authorsname."','".$authorssite."','".$hightpx."','".$widthpx."','".$backroundcolor."')"; mysql_query($query); ?> <!-- This is the content of the Thank you page, be careful while changing it --> <h2>Thank you!</h2> <table width=50%> <tr><td>game name: </td><td> <?php echo $gamename; ?> </td></tr> <tr><td>game file: </td><td> <?php echo $gamefile; ?> </td></tr> <tr><td>game image file: </td><td> <?php echo $gameimagefile; ?> </td></tr> <tr><td>description: </td><td> <?php echo $description; ?> </td></tr> <tr><td>authors name: </td><td> <?php echo $authorsname; ?> </td></tr> <tr><td>authors site: </td><td> <?php echo $authorssite; ?> </td></tr> <tr><td>hight px: </td><td> <?php echo $hightpx; ?> </td></tr> <tr><td>width px: </td><td> <?php echo $widthpx; ?> </td></tr> <tr><td>backround color: </td><td> <?php echo $backroundcolor; ?> </td></tr> </table> <!-- Do not change anything below this line --> <?php } CloseTable(); include("footer.php"); ?>[/code] i have blnked out data conecting with ***** so just in case yu thinks its an error, thank you!
×
×
  • 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.