megafu Posted January 28, 2007 Share Posted January 28, 2007 hi and thanks for trying to help me out! :Pi would like to create a graphic counter but i just have no clue how to in one point of the thing. The thing i pretend to do is something like what follows: when a certain image is loaded it updates the DB and image. so users cand come to my site and get a free "simple" counter. example: user comes to my website clicks "create counter" ... gets a html counter witn some image .... then displays it on its website/blog, then each time the image is loaded ... it updates the DB and imagereally need help on the "when the image is loaded ... it updates the DB and image" :(thanks :) Quote Link to comment https://forums.phpfreaks.com/topic/36118-help-please/ Share on other sites More sharing options...
JasonLewis Posted January 28, 2007 Share Posted January 28, 2007 well to do it graphicly you would have to use GD. then you could just have on there website an include script that points to a php page on your site which handles everything.[code=php:0]<?php$ID = "1462";include('http://www.yoursite.com/counter/updateDB.php');?>[/code]then in the updateDB.php page just have it update the DB, lol. :) Quote Link to comment https://forums.phpfreaks.com/topic/36118-help-please/#findComment-171488 Share on other sites More sharing options...
HuggieBear Posted January 29, 2007 Share Posted January 29, 2007 [quote author=ProjectFear link=topic=124471.msg515749#msg515749 date=1170028544]well to do it graphicly you would have to use GD[/quote]Why would you? Why not create an image for each number, 0 through 9 and then use a little function to replace any number with that of it's counterpart image. This would be really simple, especially if you gave the images numbers as names, e.g. 0.gif, 1.gif, 2.gif.....Get the idea?RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/36118-help-please/#findComment-171497 Share on other sites More sharing options...
megafu Posted January 29, 2007 Author Share Posted January 29, 2007 hey, well... first of all thanks for your help but i think i didnt explain well the thing is the users would only have a simples code like in the example bellow: [code]<div><a href="http://www.mywebsite.com"><img src="http://www.mywebsites.com/counter/123456_type.jpg" border=0><br/>Get your counter</a></div>[/code]where: 123456 is the counter ID ... and type the type of image to display ... like if have 3 types (black background, white, yello with a monkey! :P) :) Quote Link to comment https://forums.phpfreaks.com/topic/36118-help-please/#findComment-171505 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.