Jump to content

entity_azirius

Members
  • Posts

    17
  • Joined

  • Last visited

entity_azirius's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Oh no, it works, lol, it was just using the same image as the monster image :)Well thanks for the help! Much appriciated
  2. <?PHP$a = "555";$b = "5555";$string = ($a == $ ? 'equal.php' : 'not_equal.php';include("$string");?> Thats pretty similar to what you wrote.
  3. So your saying I can have three different images merged into one? Is it possible to give me an idea how its done?
  4. I've been working with PHP's GD Library for a few weeks now and I've found something that maybe able to be helpful to certain aspects of my site. This is the imagecopymerge() function.I've succesfully merged two images together.http://entitys-arena.co.uk/images/RoE/GD.phpNow, what I am trying to build here is a battle scene, but as it is, I've hit a wall when trying to merge more than two items together, so I could have more than one monster/thing on the image at once. Is there anyway I could merge more than two images together?Here is the current code: <? header('content-type: image/jpeg'); $max_monsters = 3; $monster_img = array('01', '02', '03', '04'); $monster_base_url = "/home/.flirt/entity_azirius/entitys-arena.co.uk/images/RoE/"; $monster_back_url = "back/"; $monsters_url = "monsters/"; $count = count($monster_img); $select = rand(0, ($count - 1)); $mons_src = $monster_img[$select]; $monster = imagecreatefrompng("/home/.flirt/entity_azirius/entitys-arena.co.uk/images/RoE/monsters/$mons_src.png"); $monster_width = imagesx($monster); $monster_height = imagesy($monster); $image = imagecreatetruecolor($monster_width, $monster_height); $image = imagecreatefromjpeg("/home/.flirt/entity_azirius/entitys-arena.co.uk/images/RoE/back/01.jpg"); $size = getimagesize("/home/.flirt/entity_azirius/entitys-arena.co.uk/images/RoE/back/01.jpg"); $dest_x = $size[0] / 8; $dest_y = $size[1] / 4; imagecopymerge($image, $monster, $dest_x, $dest_y, 0, 0, $monster_width, $monster_height, 100); imagejpeg($image); imagedestroy($image); imagedestroy($monster);?> If there is someone who thinks they can help me, I'll be very greatful
  5. Heh, well it seems that the problem has been sorted. A function that was used before was messing around with the arrays. Here is what was messing things about! <?php// Clean up MySQL - By Zulumonkeyfunction cleanall() { foreach($_POST as $key => $val) { $_POST[$key] = stripslashes(strip_tags($val, ENT_QUOTES)); $$key = stripslashes(strip_tags($val, ENT_QUOTES)); } foreach($_GET as $key => $val) { $_GET[$key] = stripslashes(strip_tags($val, ENT_QUOTES)); $$key = stripslashes(strip_tags($val, ENT_QUOTES)); }}cleanall();?> But I am not entirely sure why it is not working because of this code, though.Well thank you for all your help on this. It has been much appriciated.
  6. The file is included through another file containing only switches, so no problem there.No Javascript at all, appart from a little on a marquee but nothing that should affect the form.I've even changed the list to PMLIST to make sure, it still considers it as "Array"I don't understand this, its completely stupid! Lol
  7. Ah, now that I've added that piece of code, it is telling me that it isn't even an array... what happens now? :S This is so confusing!
  8. Ah that must be a recent addition, because they were just attempts at getting things working, I've also tried imploding and exploding as well, and attempting it without counting and exploding/splitting results in the following error (imploding gives an error message also, but a different one):Warning: Invalid argument supplied for foreach() in PMinbox.php on line 265Which I don't understand, it doesn't seem to read the Array correctly or something... :SREMOVEDThat is how it should look by the way!It should all work, but for some reason it doesn't. Its probably something quite simple, but it has me well and truely baffled!
  9. REMOVEDThat is the whole code... lol
  10. Also it seems instead of splitting it into numbers, its calling them Array... which is really really weird (and not to mention annoying!)!
  11. The method I get an images height is like so: <?phplist($width, $height) = getimagesize("Insert Images URL here!");echo("Width: $width");echo("Height: $height");?> There are other thing the getimagesize() function can do.Click here for a more in depth guide on it!
  12. Well I've moved the code around since then, that particular line happens to now be 264, this line happens to be:REMOVEDI don't know if that is the information that you are looking for?
  13. I do hate to double post, but I've still not been able to solve my problem, I've even tried modifying it slightly, tried exploding and imploding the results, but still to no avail!Help would of course be appriciated!Oh, and I'm working with MySQL version 5.0.24 if that makes any difference on the way the MySQL code is written!
×
×
  • Create New...