Reply
Quick image script?!
Old 05-08-2007, 11:59 AM Quick image script?!
The PHP Professor

Posts: 308
Name: Alex
Location: Behind You
I want to make an Image script where when someone views an image the size is recorded in the database(MySQL). So basically the script is monitoring the bandwidth on an image, and when the image reaches its bandwidth limit it displays a different image. How is this done? I have experimented with files in the past but most were un successful.
__________________
Go Kirby! <(" . "<) (^" . "^) (>" . ")> Talkupation!
Need a FILE host? Nobody gets it done right like 1Stopupload.com!
microcolt is offline
Reply With Quote
View Public Profile Visit microcolt's homepage!
 
When You Register, These Ads Go Away!
     
Old 05-08-2007, 01:35 PM Re: Quick image script?!
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
well it sounds simple enougth :
you use the filesize function to get the picture filesize.
the logic is something like this :
$curent_image='asdf';
$bandwidth=check_bandwidth($curent_image); // a function that will check the curent image bandwidth ... a simple querry
if ($bandwidth<'99999'){
echo 'html_image_tags';
add_bandwidth($curent_image,filesize($curent_image ));
} else {
reset_bandwidth($curent_image);
next_image
}

hope you understand
__________________
If you like my posts ... TK is appreciated:)
Web Directory | Blog
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Old 05-08-2007, 05:47 PM Re: Quick image script?!
The PHP Professor

Posts: 308
Name: Alex
Location: Behind You
Close, but i want to make it so that if i wanted to post the image here with the <img src="....."> code or on a web page they could.
__________________
Go Kirby! <(" . "<) (^" . "^) (>" . ")> Talkupation!
Need a FILE host? Nobody gets it done right like 1Stopupload.com!
microcolt is offline
Reply With Quote
View Public Profile Visit microcolt's homepage!
 
Old 05-09-2007, 04:28 PM Re: Quick image script?!
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
then you could make a script ... gen_image.php that will generate images acording to you're rules
__________________
If you like my posts ... TK is appreciated:)
Web Directory | Blog
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Old 05-10-2007, 08:38 AM Re: Quick image script?!
The PHP Professor

Posts: 308
Name: Alex
Location: Behind You
do you have a little example code? i dont usually do images with php.
__________________
Go Kirby! <(" . "<) (^" . "^) (>" . ")> Talkupation!
Need a FILE host? Nobody gets it done right like 1Stopupload.com!
microcolt is offline
Reply With Quote
View Public Profile Visit microcolt's homepage!
 
Reply     « Reply to Quick image script?!
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.14580 seconds with 13 queries