You might want to use a PHP graphics library such as GD or ImageMagick - if you look at the output of phpinfo() you will be able to see whether you have either of these modules installed on your server. If do not have shell access to your server then you might not be able to install these libraries if they are not already available - there might be a way to work around this using PEAR, but I have no experience using that so I can't give you any advice on how to do this. Another option is to ask your hosting provider to install them for you, but some are not very helpful and will tell you that you need to "upgrade" your package if you want this functionality (i.e. they will only help you if you pay them more money).
M_G
header not working, Do you see why?
Moderator: General Moderators
- mecha_godzilla
- Forum Contributor
- Posts: 375
- Joined: Wed Apr 14, 2010 4:45 pm
- Location: UK
Re: header not working, Do you see why?

Is this the GD that will help me?
- mecha_godzilla
- Forum Contributor
- Posts: 375
- Joined: Wed Apr 14, 2010 4:45 pm
- Location: UK
Re: header not working, Do you see why?
Yes - that's it. If you go to the PHP manual you'll see that there's a chapter that details all of the GD functions:
http://php.net/manual/en/book.image.php
There are also a small number of examples on the following page:
http://www.php.net/manual/en/image.examples.php
The "Adding watermarks to images using alpha channels" example is probably closest to what you want to do but note that it sends the image to the browser rather than writes it to a file on the server, so you'll need to modify the script to support this functionality.
M_G
http://php.net/manual/en/book.image.php
There are also a small number of examples on the following page:
http://www.php.net/manual/en/image.examples.php
The "Adding watermarks to images using alpha channels" example is probably closest to what you want to do but note that it sends the image to the browser rather than writes it to a file on the server, so you'll need to modify the script to support this functionality.
M_G
Re: header not working, Do you see why?
thanks, ill have a look at it now
Re: header not working, Do you see why?
just a little update, I got it all working just how I wanted it to =P thanks to you that is.
- mecha_godzilla
- Forum Contributor
- Posts: 375
- Joined: Wed Apr 14, 2010 4:45 pm
- Location: UK
Re: header not working, Do you see why?
No problem - happy to help 
M_G
M_G
Re: header not working, Do you see why?
Well I'm back, And I come with questions lol.
Let me see if I can make sense of this with text:
I want to make it so an enemy this can be randomly made based on the lvl of the user.
Put it this way I have a table in the data base that is named parts. It has 4 types of parts, head, right arm, left arm, legs. each one has an ID number and a lvl.
Say the user is lvl 1 and I only want the random generator to pick parts at random to use but they all have to be min of lvl 1 and max of lvl 2. How can I do this?
Things I have thought about doing:
-Making all items of the same lvl with in a set ID number range so 1-100 is lvl 1 then 100-200 lvl 2 so i can just base it off that. I really don't want to though. With will limit new parts being added to the table.
-Get all the lvl that are the same as the user then get all the id numbers from smallest to largest and randomly pick one. I would like to do it this way but I don't know how.
Is there a way to randomly pick numbers that are not in order? like 1 3 6 7 9 25 37 89. and only be able to pick from those numbers?
well I hope this makes sense, if not feel free to tell me.
Let me see if I can make sense of this with text:
I want to make it so an enemy this can be randomly made based on the lvl of the user.
Put it this way I have a table in the data base that is named parts. It has 4 types of parts, head, right arm, left arm, legs. each one has an ID number and a lvl.
Say the user is lvl 1 and I only want the random generator to pick parts at random to use but they all have to be min of lvl 1 and max of lvl 2. How can I do this?
Things I have thought about doing:
-Making all items of the same lvl with in a set ID number range so 1-100 is lvl 1 then 100-200 lvl 2 so i can just base it off that. I really don't want to though. With will limit new parts being added to the table.
-Get all the lvl that are the same as the user then get all the id numbers from smallest to largest and randomly pick one. I would like to do it this way but I don't know how.
Is there a way to randomly pick numbers that are not in order? like 1 3 6 7 9 25 37 89. and only be able to pick from those numbers?
well I hope this makes sense, if not feel free to tell me.