ejasoft
May 2 2005, 11:54 PM
this is a counter with images and stor in flat file becouse i can not upload .zip .rar file iwell program it on this post at frist you need to 2 files count.php count.txt and you need else make folder has name gifs and make 10 pictuer 10 file 0.gif to 9.gif now all ok open the count.php and add this code CODE <? ### IMAGE FORMAT $format = ".gif"; $file = file("count.txt"); $num = ($file[0] + 1); exec("echo $num > count.txt"); switch($type) { case "text": echo $num; break; case "gfx": $i = 0; $cntn = strlen($num); while($i < $cntn) { $tmpnum = substr($num, $i, 1); echo("<img src=\"$dir/$tmpnum$format\">"); $i++; } break; case "q": break; default: echo("count.php <b>error</b> : type not specified."); break; } ?> thats all
Comment/Reply (w/o sign-up)
FirefoxRocks
Sep 22 2008, 05:45 PM
If this is a script that is supposed to produce a hit counter that loads images for its numbers, it is poorly designed. The concept that is. With the fonts, colours and various CSS properties available and usable in todays browsers, why do we need to make a counter with images? As for the functionality of your PHP script, I haven't tested it out yet but I would think that if I were to write a counter, I would store the data within the PHP file itself.
Comment/Reply (w/o sign-up)
magiccode9
Sep 23 2008, 11:30 AM
It is best not to use system function when typical php functions do the job. Create a function to wrap the steps for opening and closing file, and / or also the compute steps. Should this use division and remainder be much better ? It is just my opinion
Comment/Reply (w/o sign-up)
Similar Topics
Keywords : Counter Img File- Online HTML/PHP Editor: Edit File In Browser!
- (11)
Im wondering how you can load a file into a text area and edit it. Lets say i have a php file called
test.php and id like this file to be loaded into a textarea and the user should be able to edit this
file and store it. Is this posible? Im also wondering how you make it so the html dosnt get
encoded by the browser, lets say i need to explain on my website how you use html. CODE Just
testing something, maybe i can get this from the source. ...
Php Script To Download File From Another Site
- (11)
hi i need a php or java script code for downloading files from other sites to my site for example:
http://download.com/file.zip to http://mysite.com/file.zip thanks...
PHP Script To Upload A File
- with password-protection. (15)
Problem: Upload a file to the AstaHost account (that I have been granted here) throught the
webpage I would like to know, how should I proceed on this particular problem. I know this has
been done through cPanel, but I want to write a PHP functionality. The cPanel is accessed through
the 2082 port, and most of the places I access internet from does not give me access through that
port. I can access http://www.kmaheshbhat.astahost.com/ but not
http://www.kmaheshbhat.astahost.com/cpanel or http://www.kmaheshbhat.astahost.com:2082/ . I need
to go to one particu...
How To Create An Online Timed Test With PHP?
- Can we do a online test with a counter(from 20 second) php for a php-n (18)
Is there anyone got a online timed test script?Or anyone knows how to create this script? I wait
your answers and all php programmers....
Easy Visitor Counter
- Easy to use and to install (3)
Extplorer
- A PHP -and JavaScript- based File Manager (7)
Browsing the ExtJS examples website i found this excellent web-based file manager called
eXtplorer . eXtplorer allows you to browse your webserver folders with an intuitive Layout which
makes working with files very easy, and thanks to the great ExtJS Javascript Library you can drag
& drop folders and files, filter directories and sort the file list using various criteria. You can
use eXtplorer to for example: browse directories & files on the server. edit, copy, move, delete
files. search, upload and download files. create and extract archives. create new fil...
Php File Upload
- About uploading files through php (3)
Right i have done a check for a tutorial on this as well as a question about it but php is not
allowed in the search box. So i thought i'd just ask what i want to know. I have a form which
uploads a file, it refreshes the page, uploads the file and then alerts the user to if the file has
uploaded. To be honest im not sure why i keep getting the error. But here is the code: This is the
form that is used for the user to select the file &fid= " method="POST"> Choose a file to
upload: This is the upload code if ($op == "up"...
Automated File Structure Creation Script
- As Requested By Mark420 (3)
While chatting with Mark420 today on the shoutbox, he mentioned that he was looking for a script to
create his entire folder structure with just a click of a button. For example, he wanted the
following folders created in his root folder by just clicking submit. /images /images/thumbs
/images/icons /css /javascripts /content /content/articles /content/tutorials Presumably this
would be used for some type of installation system or other quick server setup situation. Anyhow
here is what I threw together for him: /* ********************************************...
How To Force A Zip File To Be Downloaded
- (11)
Hi, i have a problem with a zip file that i want to be force downloaded by any client, i know that
with the header function it can be achieved but dont know why it doesnt works. I have two files, the
first one is a simple html file with an a tag and the second is a php file, here is my code: html
file: CODE Download File Php file: CODE header('Content-Type:
application/zip'); header('Content-Disposition: attachment; filename="file.zip"');
readfile('downloads/file.zip'); ?> May be i forgot something, does it is necessary to ...
How To Delete File Using PHP Shell Script
- (3)
i have this problem regarding file access seems that my admin host or the server system itself have
locked up the acces to create new file, delete a file.. change file permissions and such controls
to file.. someone told me to use php shell script.. can you help me out here? ******** i just
need to find out how to use php shell script and add it to my php scripts to delete a file.. thanks...
Updating An Rss File Using A Php Form
- (1)
Hi, I'm currently making a site for my organization but I'm stuck on this one section where
I would have to make a PHP form in order for other members to post an item into my RSS file. So does
anyone know a PHP script I can use in order for me and other members to input a new RSS item into my
news RSS file?...
File Self Secure?
- is it avaible (6)
I just learn php. We store the pass word of Mysql in a file right. So is there any way to may a pass
protect that file . i mean they could hack and find out the place of the file (ex like in forum) and
drop all sercure data /huh.gif" style="vertical-align:middle" emoid=":huh:" border="0"
alt="huh.gif" />...
Xgrid With Php
- Creating a script to post a blender file to Xgrid using PHP (0)
I am doing pre planning for the blenderxgrid.com script. I was originally going to do this with
PERL, but elected against it. Eventually I'll be moving the site off astahost and replacing it
with a website hosted on the same machine as the xgrid controller. I am setting up a test version
on my latop using OSX's apache server, MySQL, and PHP on a localhost config. Here is my step
list for the script: ------------------------------------- Form: (within Xoops CMS, so user will
have to be logged in) Username Password (where they can upload the .blend file...
How To Embed Ram File Produced By Http Header
- (2)
Dear Friends I want to stream music from my website. The file format is .rm. People say that one
need a Helix Server or other media server to stream. I have found a solution to this problem as
well. I read an article about streaming music. It tells that if the size of the media file is small
and the byte rate of the media file is lower than that of the user internet connections byte rate,
the file get streamed automatically from HTTP server. In theory, any file is "streamed" by a web
server that is, sent back to the client in small pieces. What makes media files speci...
Display Text If Line Not Empty In Config File
- (8)
I have been working on a new template and I would like it so that if in the global configuration
file, I have a variable for a global site announcement that would go on every page. The line in the
global configuration file is this: CODE $announcement = "ANNOUNCEMENT"; In my template file,
I could easily add CODE but that would leave a blank space and with the announcement style
(similar to the Invision Power Board error box). Is there some sort of script that could be put in
the template page so I could have the global config file look something like t...
Generating A Table Into A File In CSV Format
- and letting user download the file (6)
I'm working on a project, part of which consists of working with large tables of different
kinds. Now, I'm using a page seeking technique which allows you to browse through the records
depending on which page you want to see and how many records you want to see on each page. Now, I
need a link (or a form button) on each page which, when clicked, will throw a file to the user for
download (the download window should popup immediatly) which will give the part of the table,
currently being viewed, in CSV format. One way I can think of to generate the file is manu...
PHP File Upload Works... But Stupid IE
- (3)
ok i have used the following code in my upload.php file Code: CODE $uploaddir =
'../photos/'; $uploadfile = $uploaddir . basename($_FILES ); echo ' '; if
(move_uploaded_file($_FILES , $uploadfile)) { echo "File is valid, and was successfully
uploaded.\n"; } else { echo "Possible file upload attack!\n"; } using ../photos/ as my
upload DIR works, as the file does upload, but when i echo $uploadfile on the same page: Code:
CODE " alt="uploadedfile" /> IE wont show it as it has two fullstops before the photo dir
in the domain...
Php Reading And Writing To File
- the code is very esay (4)
this code to Read from file you can use this code in to make a small data base and it is very to
use CODE $fp = fopen ("file.txt", "r"); $bytes = 4; $buffer = fread($fp, $bytes); fclose
($fp); print $buffer; ------------------- to write to same file CODE $fp = fopen
("file.txt", "w+"); fwrite ($fp, "Test"); fclose ($fp); ---------------- thanks and iwait the
commant...
Link Counter
- (3)
i have a game site and i wanted to know how can i create a link counter for every game i have and i
want it all to use the same script not have to use like 10 diffrent scripts how can i make this or
is there any site that offers the script for free?...
Php Problem - Unique Counter
- my script isn't working correctly (4)
alright here's what I want to do: I made a counter to count unique visitors without a mysql. But
the problem is that the '.dat' file I'm writing on (unique.dat) tends to become too big
when I have too many visitors. Thus, I tried to add an if/then statement. Kay, now here's the
problem: even though this code successfully runs, it's not a hundred-percent accurate. Sometimes
it rewrites a user's IP even though it is already on the '.dat' file. Even though it
doesn't actually affect the $hits, I'd still like to know what I did w...
Where Can I Get Counter?
- for my homepage (8)
can anyone recommend good free counter service /rolleyes.gif" style="vertical-align:middle"
emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> thank u sir /smile.gif"
style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />...
Looking for counter, img, flat, file
|
See Also,
*SIMILAR VIDEOS*
Searching Video's for counter, img, flat, file
|
advertisement
|
|