OZONE Asylum
Forums
Server-Side Scripting - Oh my!
php mysql problem
This page's ID:
28263
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
[code]<?php header("Content-type: image/png"); $datab=mysql_connect("localhost", "db", "pass"); mysql_select_db("bloodonthecanvas_com_1"); $id=trim($id); $ip = GetHostByName($REMOTE_ADDR); MYSQL_QUERY("INSERT INTO `farrierhits` (`ip`) VALUES ('$ip')"); $vis=mysql_QUERY("SELECT COUNT(DISTINCT(`ip`)) FROM `farrierhits`"); $widthcalc=strlen($vis); $px = 7.5 * $widthcalc; $im = imagecreatefrompng("images/button1.png"); $orange = imagecolorallocate($im, 255, 0, 0 ); $font = imageloadfont("timesbd.ttf"); imagestring($im, $font+5, 0, 0, $vis, $orange); imagepng($im); mysql_close($datab); imagedestroy($im); ?>[/code] ok this is an image i have which is suposed to be a hit couter but at the moment it is logging each hit twice and i cant figure out why can anyone help? p.s. it might be a little messy as i have been messing around with it trying to figure out the problem
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »
Maximum Security
OZONE
DHTML/Javascript
Server-Side Scripting - Oh my!
CSS - DOM - XHTML - XML - XSL - XSLT
Stupid Basic HTML
Visual Therapy
Photoshop
Photoshop Pong, Anyone?
***WARNING*** BIG SIG APPROACHING
Photography
3D Modelling & Rendering
Multimedia/Animation
Print Graphics
Holding Pens
Philosophy and other Silliness
Outpatient Counseling
Site reviews!
Mad Scientists' Laboratory
Getting to know the Grail