dshallenberger
-
Posts
2 -
Joined
-
Last visited
Never
Posts posted by dshallenberger
-
-
I\'m building a site that has the potential for a lot of traffic. It\'s a site for posting \'for sale\' ads for anything from trinkets to houses. It\'s the internet version of a current local \'stuff-for-sale\' magazine. Well, the current magazine has about 1,500 ads in it monthly. So I would assume the potential for that many ads, and more, would be placed monthly on this site, with everyone paying with a credit card and submitting an ad, as well as contact information, that will be written to a database. Plus, every page view will pull from the database.
My concern is in my programming techniques and using mysql for a site with this much traffic. Is using basic php and sql to connect to the database and read/write ok? Should I be using a different database? or a different way to connect and/or read/write? is there a limit to open connections for mysql? or general techniques for higher-traffic sites?
I\'ve written a lot of PHP and SQL interacting with mysql, but all somewhat basic/intermediate usage and much lower traffic. Does any of this make a difference?
Thanks for any advice...
Dan
GD / transparent png question
in PHP Coding Help
Posted
I ended up just treating it like a transparent gif and selecting a color to be transparent, and it works great, but I'm getting jagged edges, and I would love the soft shadows I can get with an alpha png.
Here's my current php script:
[code]<?
header ("Content-type: image/png");
$background = imagecreatefrompng($_POST['bkg']);
$overlay = imagecreatefrompng($_POST['char']);
imagecolortransparent($overlay,imagecolorat($overlay,0,0));
$insert_x = imagesx($overlay);
$insert_y = imagesy($overlay);
imagecopymerge($background,$overlay,0,0,0,0,$insert_x,$insert_y,100);
imagepng($background);
?>[/code]
I've seen transparency functions within gd that seem to allow use of the alpha of the png, but I can't get them to work with imagecopymerge. I'm sure it's me doing something wrong, but I don't know what. I hope my explanation above is clear.
Anyone here have an idea of how I can accomplish this.
Thanks,
Dan