Jump to content

Flustered

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Flustered's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I accidently figured it out, there also was a error at the top of each php page. There was a "function dl" text showing at the top of each page. I tracked it to a line of dl('bgd.dll'); in a config file. I blocked it out (//) and now it all works.
  2. I did as above, but still no luck on the GD2.0 working. I know the site files are good as it worked on a server that was dropped. On the install, it said extension_dir = "C:\php\ext", and you suggested extension_dir = "C:/php/ext" Neither way made any difference. Any more ideas?? Thanks for the help!
  3. I was setting up a web server on my home pc with XP. I installed Apache 2.2 and PHP 5.2.6 and got the website running, but can't figure out how to get the GD 2.0 function working that is needed for part of the website. Can someone walk me thru what is needed to get it to work? From what I read, its supposed to be part of PHP 5.2.6. Thanks all!!
  4. Thanks you very much for the help! This is showing results now, but I need it to show the results from the most recent back. It is showing the first 10 since the bot was started, so it will never change. The modifier lines are formatted like: [06/20/08 18:35:59] The war between the four parts of the realm has shown the power of the Southeast [153/361] and the Northwest [81/200], whereas it led the Northeast [0/0] and the Southwest [68/227] to perdition. [06/21/08 18:41:17] The war between the four parts of the realm has shown the power of the Northwest [304/311], whereas it led the Northeast [1/255] to perdition. The diplomacy of the Southeast [23/33] and the Southwest [99/274] was admirable. Is there a way to get it to read the date and go from the most recent backwards?? Thanks again for the help!!
  5. I really appreciate your help, I'm very new to trying this. I tried the code below and the page opens, but very slowly. The page shows the "War Report:" , but is blank from there on. It doesn't show the results from modifiers.txt or the footer. Did I do the structure wrong or?? Thx again!! <?php include("config.php"); $irpg_page_title = "War Report"; include("header.php"); include("commonfunctions.php"); echo "<h1>War Report:</h1>\n"; $txt = fopen( "modifiers.txt", "a+" ); $lines = 0; while ( !feof( $txt ) ) { if ( ereg( "war between", fread( $txt, 512 ) ) && $lines < 10 ) { print str_replace( "war between", "<strong>war between</strong>", fread( $txt, 512 ) ) . "<br />\n"; $lines += 1; } } fclose( $txt ); ?> <? include("footer.php"); ?>
  6. This is an example of the line I need read.. [07/07/08 19:12:11] The war between the four parts of the realm has shown the power of the Southeast [2148/2963], whereas it led the Northeast [13/1264] to perdition. The diplomacy of the Southwest [1729/1757] and the Northwest [1248/2181] was admirable.
  7. I have the following start to a code that I need, I need it to read a file called modifiers.txt and return all the lines with "war between" in it, with a maximum of 10 lines returned, and reading from the latest line to the oldest. Thx all!! <?php include("config.php"); $irpg_page_title = "War Report"; include("header.php"); include("commonfunctions.php"); echo "<h1><font color=red>War Report</font></h1>\n"; -------------- code to detect trigger words from modifiers.txt and post to html if "war between" isin modifiers.txt echo line to html maximum of 10 lines ---------------------- ?> <? include("footer.php"); ?>
  8. I was looking at that script and from the info on the other forum, it was taken from a use that involved a lot more, so there may be a lot of code that isn't needed. All it needs to do is pick out those certain lines and then fix them to post on the html page.
  9. I tried the following php code for a war report on an idlerpg website, but nothing shows up, there has been many wars happen. What could be wrong?? Thanks all! I was hoping someone here had some experience with this and could help. I did this from info at http://www.9th-floor.org/phpBB2/viewtopic.php?t=787 and http://www.9th-floor.org/phpBB2/viewtopic.php?t=580&postdays=0&postorder=asc&start=15 The forum there is all but dead for help. This link is an example of what I am trying to get working http://afternet.org/idle/wars.php The page shows with title (War Report:), but no results The line from the modifiers.txt is : [07/07/08 19:12:11] The war between the four parts of the realm has shown the power of the Southeast [2148/2963], whereas it led the Northeast [13/1264] to perdition. The diplomacy of the Southwest [1729/1757] and the Northwest [1248/2181] was admirable. I also had a question about doing a page like this for team battles, but there are 2 end lines ( have won! and have lost!) Is this possible?? <?php include("config.php"); $irpg_page_title = "War Report"; include("header.php"); include("commonfunctions.php"); echo "<h1>War Report:</h1>\n"; function array_csort() { //coded by Ichier2003 $args = func_get_args(); $marray = array_shift($args); $msortline = "return(array_multisort("; foreach ($args as $arg) { $i++; if (is_string($arg)) { foreach ($marray as $row) { $a = strtoupper($row[$arg]); $sortarr[$i][] = $a; } } else { $sortarr[$i] = $arg; } $msortline .= "\$sortarr[".$i."],"; } $msortline .= "\$marray));"; eval($msortline); return $marray; } $file = fopen($irpg_mod,"r"); $temp = array(); $z=0; while ($line=fgets($file)) { if (strstr($line," war")) { $first = strpos($line,"] "); $last = strpos($line," admirable"); $first += 2; $name = substr($line,$first,$last-$first); $found=0; for ($i=0;$i<count($temp);$i++) { if ($temp[$i]["Name"] == $name) { $temp[$i]["Count"]++; $found=1; } } if ($found==0) { $temp[$z] = array("Name" => $name, "Count" => 1); $z++; } } } fclose($file); $temp = array_csort($temp, "Count", SORT_DESC, "Name", SORT_ASC); reset($temp); $countcheck = 0; for ($i=0;$i<count($temp);$i++) { $reportname = $temp[$i]["Name"]; $count = $temp[$i]["Count"]; $file = file($irpg_db); unset($file[0]); usort($file, 'cmp_level_desc'); $found2=0; foreach ($file as $line) { list($user,,,$level,$class,$secs,,,$online,,,,,,,,,,,,, $item['amulet'], $item['charm'], $item['helm'], $item['boots'], $item['gloves'], $item['ring'], $item['leggings'], $item['shield'], $item['tunic'], $item['weapon'], $alignment, ) = explode("\t",trim($line)); if ($user == $reportname) { /* why not HTML_entity? tb */ $userclass = str_replace("<","<",$class); $userclass = str_replace(">",">",$userclass); $user2 = str_replace("<","<",$user); $user2 = str_replace(">",">",$user2); $user_encode = htmlentities(urlencode($user)); $next_level = duration($secs); $userlevel = $level; $useronline = $online; $found2=1; $sum = 0; foreach ($item as $key => $val) { $sum += $val; } } } if ($found2==1) { $found2=0; if ($count == $countcheck) { print "<BR> <a".(!$useronline?" class=\"offline\"":"")." href=\"playerview.php?player=$user_encode\">$user2</a>, the level $userlevel $userclass.[$sum] Next level in $next_level.</li>\n"; } else { echo "<P><span class='contentheading'>$count win".($count>1?"s":"")."</span>\n"; print "<BR> <a".(!$useronline?" class=\"offline\"":"")." href=\"playerview.php?player=$user_encode\">$user2</a>, the level $userlevel $userclass.[Total sum: $sum] Next level in $next_level.</li>\n"; $countcheck = $count; } } } echo "<BR><BR>\n"; ?> <? include("footer.php"); ?>
  10. What I was trying to say was if you search for multiple words, it gives results of any one word in different colors, but can be a large result page. I was wondering if it could be changed so it only gave results that only contained all of the search words used. So if you had the following lines in the data and searched for "one two"(on separate lines), only the "one two three" line would be a result one two three one three four one three five Currently it would show all three lines as a result with "one" in red, and "two" in blue
  11. sorry for delay, its real close, but there is one thing that would be better. On the multiple word search, it searches for either, and would be a lot better if it only searched for both (or multiple). For example, if you searched for "one" and "two" in search box, it shows all results with either word, instead of narrowing the search to only ones with both words. Again, I want to thank you for the help and effort!!
  12. There is no need for you to apologize, your help has been so greatly appreciated. I feel bad that I am so ignorant that I have to ask for so much help. The change doesn't seem to work however. It shows 1 blank result for each multi-word try. i.e. The keywords "one three" found 1 result(s): 1. Single word search still works
  13. can it be modified to search for words more at random? I noticed that if you had a line of <one two three>, it would search and find "one two" and "two three", but no results if search was for "one three". Also because of the format of data, there are dots and astericks, so if the data line was <one.two*three>, there would be no results for searching "one two". I really appreciate the time and effort in helping with this, as I get totally lost.
  14. sorry I'm so dense on this, but I don't quite understand what you mean by: Can you give me an example or something? Thanks
×
×
  • 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.