What do you think of this vap banner

Status
Not open for further replies.
Nice work with the colours now, I've tested it with my actual details but it looks like I am forced to vape at least 1ml per day: :rolleyes:
I vape actually 0.3ml per day, ok I know it's below the average, but since it's an average one should also want to put 1.5 and so on...
it gives me this error message:
"mL per day and smokes per day must be numbers only"
Now, since 0.3 is actually a valid number expression ;)
I suggest you to use the is_numeric() function instead of just checking whether the submitted value has digits 0-9.
 
I guess it would be more accurate.

Oh database you said, so one more suggestion (maybe later when a lot of people will use the sig) is to make a sort of "daily caching" of the image, I explain:
if you're planning to show only data that will not change in 24hrs, making a select on db for every single request the banner receives (and in forums like this one it's easy to get thousands) would be hard work for the db table, and in some way useless since it's not changing anything, the image displays always the same data for each id.
So I could suggest to render with GD functions the image-per-id only ONCE per day, and save it phisically in your webspace in a subfolder (you call the file "img$id.png"), so the following thousands of requests will be just redirected to the data contained in that cached png, instead of querying the db and gd-rendering the image every single time. Clean rudely all cached pngs in the subfolder every day (chronjob) or simply check the single img-id for date.
To output the data of existing image you can use fpassthru() function. Works pretty cool and saves db and script work!

Hope it's understandable!
 

jexmex

Super Member
ECF Veteran
Jul 21, 2009
354
0
jackson,mi
I guess it would be more accurate.

Oh database you said, so one more suggestion (maybe later when a lot of people will use the sig) is to make a sort of "daily caching" of the image, I explain:
if you're planning to show only data that will not change in 24hrs, making a select on db for every single request the banner receives (and in forums like this one it's easy to get thousands) would be hard work for the db table, and in some way useless since it's not changing anything, the image displays always the same data for each id.
So I could suggest to render with GD functions the image-per-id only ONCE per day, and save it phisically in your webspace in a subfolder (you call the file "img$id.png"), so the following thousands of requests will be just redirected to the data contained in that cached png, instead of querying the db and gd-rendering the image every single time. Clean rudely all cached pngs in the subfolder every day (chronjob) or simply check the single img-id for date.
To output the data of existing image you can use fpassthru() function. Works pretty cool and saves db and script work!

Hope it's understandable!
Actually I was figuring in the future caching it hourly (cause the calculations are based hourly). The other feature I am going to add is choosing your banner. Right now, this is a pre v1, and its kinda a side thing, so I am going to add those features in my free time in the near future.
 
Status
Not open for further replies.

Users who are viewing this thread