php-general Digest 31 Jul 2009 09:31:41 -0000 Issue 6259

2009-07-31 Thread php-general-digest-help
php-general Digest 31 Jul 2009 09:31:41 - Issue 6259 Topics (messages 296076 through 296096): Re: regex - filtering out chinese utf8 characters 296076 by: Jim Lucas Re: Asterisk anyone? 296077 by: Skip Evans 296085 by: Nathan Nobbe 296093 by: Per Jessen

[PHP] Extract an element from XML

2009-07-31 Thread Angelo Zanetti
Hi all, I have the following segment of XML: BookingReference ReferenceSource=api165432 /BookingReference Now I want to get the value of the BookingReference where the ReferenceSource = api. In other words I want to get the value 165432. I have the following code:

Re: [PHP] Asterisk anyone?

2009-07-31 Thread Per Jessen
Nathan Nobbe wrote: On Wed, Jul 29, 2009 at 1:18 PM, Skip Evans s...@bigskypenguin.com wrote: Hey, I've been asked to write a simple couple of public pages that would let an Asterisk customer modify their account configuration, but the client has no idea how Asterisk stores its data,

Re: [PHP] Ridiculous ..won't print or echo ...(RESOLVED)

2009-07-31 Thread ej S(ibr(ina on...@mojestopa.cz
Just testing message Miller, Terion napsal(a): Yep I forgot about escaping the $ On 7/29/09 10:51 AM, Ford, Mike m.f...@leedsmet.ac.uk wrote: -Original Message- From: Miller, Terion [mailto:tmil...@springfi.gannett.com] Sent: 29 July 2009 16:36 Ok in my output to Quark I

Re: [PHP] Ridiculous ..won't print or echo ...(RESOLVED)

2009-07-31 Thread ej S(ibr(ina on...@mojestopa.cz
I'm sorry for this post. It's only testing. Thanks for understand. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Better Formatting Options?

2009-07-31 Thread Richard Heyes
Hi,        I have many products per page and this code pulls the list price and formats it.  It works fine, but I'd like to know if I can shorten it. Personally, I would advise against trying to cram as much as possible into the least amount of space as possible, and instead going for

Re: [PHP] fileinfo returning wrong mime type for Excel files

2009-07-31 Thread Ashley Sheridan
On Thu, 2009-07-30 at 21:26 -0400, b wrote: On 07/30/2009 10:15 AM, Ashley Sheridan wrote: On Thu, 2009-07-30 at 07:12 -0700, Christoph Boget wrote: You could email it to me, which I presume is better if you replied back just to me and not the list? Just copying the list back on in

Re: [PHP] Extract an element from XML

2009-07-31 Thread Aschwin Wesselius
Angelo Zanetti wrote: Hi all, I have the following segment of XML: BookingReference ReferenceSource=api165432 /BookingReference Now I want to get the value of the BookingReference where the ReferenceSource = api. In other words I want to get the value 165432. I have the following code:

Re: [PHP] Extract an element from XML

2009-07-31 Thread Aschwin Wesselius
Aschwin Wesselius wrote: Angelo Zanetti wrote: Hi all, I have the following segment of XML: BookingReference ReferenceSource=api165432 /BookingReference Now I want to get the value of the BookingReference where the ReferenceSource = api. In other words I want to get the value 165432. I have

[PHP] PHPBB Speed Issues

2009-07-31 Thread Ashley Sheridan
Hi Guys, I know this is maybe a bit specific for the general list, but thought I'd throw it out there anyway as I reckon a lot of you have had experience with PHPBB at some point or another. We've got an existing installation of the forum here, that's been active for a couple of years and is

Re: [PHP] PHPBB Speed Issues

2009-07-31 Thread Paul Scott
Ashley Sheridan wrote: I've optimised the images in the template, enabled the GZ compression, and it's only improved the speed by a mere fraction. I have noticed that the page itself doesn't display until after this delay, so I was guessing that I could maybe force the buffer to flush at key

Re: [PHP] PHPBB Speed Issues

2009-07-31 Thread David Otton
2009/7/31 Paul Scott psc...@uwc.ac.za: -1. Measure everything. No point implementing a change that slows things down. Implement low-hanging-fruit first (eg a CDN) 0. Optimise your existing setup before adding more layers 1. Cache as much as you can (everything) 2. Minimise HTTP requests 3. Use

Re: [PHP] Freeing Memory

2009-07-31 Thread Nisse Engström
On Thu, 30 Jul 2009 10:42:26 -0400, Dan Shirah wrote: I don't know what version of SQL you are using, but I have found that using: mysql_free_result($result); mssql_free_result($result); ifx_free_result($result); Helped my queries run much faster and use less resources. I had something

RE: [PHP] preg_match too greedy

2009-07-31 Thread Ford, Mike
-Original Message- From: b [mailto:p...@logi.ca] Sent: 30 July 2009 03:17 echo (preg_match($pattern, $test) != false) The != false here is redundant. Understood. But what you think is redundancy is, to me, clarity in programming. I happen to think that boolean tests

Re: [PHP] Freeing Memory

2009-07-31 Thread Dan Shirah
How does that work considering that mysql_query() only returns true or false on INSERT? I'd expect the script to fail on $result not being a valid resource. I don't know about mysql as I work with MSSQL Server and Informix, but for me it works like this: $insert = ifx_prepare(INSERT INTO

[PHP] 2 ifs embedded?

2009-07-31 Thread Miller, Terion
I need this to say : If row notes is not empty and is alpha echo notes How do I get the is alpha part in here; If (!empty($row['notes'])) { echo( $trimNotes ); } I tried. If (IsAlpha($row['notes'])) { echo( $trimNotes ); } But it broke the whole script. --Terion

Re: [PHP] PHPBB Speed Issues

2009-07-31 Thread Ashley Sheridan
On Fri, 2009-07-31 at 11:27 +0100, David Otton wrote: 2009/7/31 Paul Scott psc...@uwc.ac.za: -1. Measure everything. No point implementing a change that slows things down. Implement low-hanging-fruit first (eg a CDN) 0. Optimise your existing setup before adding more layers 1. Cache as

Re: [PHP] 2 ifs embedded?

2009-07-31 Thread Ashley Sheridan
On Fri, 2009-07-31 at 06:53 -0700, Miller, Terion wrote: I need this to say : If row notes is not empty and is alpha echo notes How do I get the is alpha part in here; If (!empty($row['notes'])) { echo( $trimNotes ); } I tried. If (IsAlpha($row['notes'])) {

Re: [PHP] 2 ifs embedded?

2009-07-31 Thread m0s
Miller, Terion wrote: I need this to say : If row notes is not empty and is alpha echo notes How do I get the is alpha part in here; If (!empty($row['notes'])) { echo( $trimNotes ); } I tried. If (IsAlpha($row['notes'])) { echo( $trimNotes ); } But it broke

[PHP] String to Date Conversion Problem

2009-07-31 Thread Alice Wei
Hi, Guys: I am trying to turn a prepared line into a date format, and the string looks something like this: 23 JUL 09 - THURSDAY, and I am trying to change the string to a mm/dd/ format that looks like 07/23/2009. I tried to use strtotime() but it gave me nothing. Here is the

Re: [PHP] Freeing Memory

2009-07-31 Thread Nisse Engström
On Fri, 31 Jul 2009 07:54:13 -0400, Dan Shirah wrote: How does that work considering that mysql_query() only returns true or false on INSERT? I'd expect the script to fail on $result not being a valid resource. I don't know about mysql as I work with MSSQL Server and Informix, but for me

Re: [PHP] 2 ifs embedded?

2009-07-31 Thread Miller, Terion
On 7/31/09 8:58 AM, m0s d...@lenss.nl wrote: (!empty($row['notes']) IsAlpha($row['notes'])) I tried that and this one: If (!empty($row['notes']) ctype_alpha($row['notes'])) It didn't display the notes at all... And this one...doesn't display if the field has a 0 in it but I still need it

Re: [PHP] String to Date Conversion Problem

2009-07-31 Thread Stuart Connolly
Hi Alice, Based on the string format that you mentioned (DD MMM YY - DAY) you should be able to transform to any other date using the following: $parts = explode(' ', '23 JUL 09 - THURSDAY'); echo date('m/d/Y', strtotime({$parts[1]} {$parts[0]} {$parts[2]})); Cheers Stuart On 31 Jul

Re: [PHP] 2 ifs embedded?

2009-07-31 Thread Bastien Koert
On Fri, Jul 31, 2009 at 10:28 AM, Miller, Teriontmil...@springfi.gannett.com wrote: On 7/31/09 8:58 AM, m0s d...@lenss.nl wrote: (!empty($row['notes']) IsAlpha($row['notes'])) I tried that and this one: If (!empty($row['notes']) ctype_alpha($row['notes'])) It didn't display the notes

Re: [PHP] 2 ifs embedded?

2009-07-31 Thread Miller, Terion
On 7/31/09 9:53 AM, Bastien Koert phps...@gmail.com wrote: On Fri, Jul 31, 2009 at 10:28 AM, Miller, Teriontmil...@springfi.gannett.com wrote: On 7/31/09 8:58 AM, m0s d...@lenss.nl wrote: (!empty($row['notes']) IsAlpha($row['notes'])) I tried that and this one: If

[PHP] unsubscription not working

2009-07-31 Thread Luke
Trying to unsubscribe from the list, send the email and get this response: 'Acknowledgment: The address tinmach...@googlemail.com was not on the php-general mailing list when I received your request and is not a subscriber of this list.' Where I'm sure that is the address I'm subscribed

Re: [PHP] 2 ifs embedded?

2009-07-31 Thread Bastien Koert
On Fri, Jul 31, 2009 at 10:59 AM, Miller, Teriontmil...@springfi.gannett.com wrote: On 7/31/09 9:53 AM, Bastien Koert phps...@gmail.com wrote: On Fri, Jul 31, 2009 at 10:28 AM, Miller, Teriontmil...@springfi.gannett.com wrote: On 7/31/09 8:58 AM, m0s d...@lenss.nl wrote:

RE: [PHP] 2 ifs embedded?

2009-07-31 Thread Chrome
On 7/31/09 9:53 AM, Bastien Koert phps...@gmail.com wrote: On Fri, Jul 31, 2009 at 10:28 AM, Miller, Teriontmil...@springfi.gannett.com wrote: On 7/31/09 8:58 AM, m0s d...@lenss.nl wrote: (!empty($row['notes']) IsAlpha($row['notes'])) I tried that and this one: If

RE: [PHP] String to Date Conversion Problem

2009-07-31 Thread Alice Wei
Looks like what I did by using mm/dd/ was extra, which was probably why it didn't work. Thanks, looks like this is up and running now. Alice CC: php-general@lists.php.net From: stu...@stuconnolly.com To: aj...@alumni.iu.edu Subject: Re: [PHP] String to Date Conversion Problem

Re: [PHP] 2 ifs embedded?

2009-07-31 Thread Miller, Terion
On 7/31/09 10:14 AM, Bastien Koert phps...@gmail.com wrote: On Fri, Jul 31, 2009 at 10:59 AM, Miller, Teriontmil...@springfi.gannett.com wrote: On 7/31/09 9:53 AM, Bastien Koert phps...@gmail.com wrote: On Fri, Jul 31, 2009 at 10:28 AM, Miller, Teriontmil...@springfi.gannett.com wrote:

[PHP] Re: This isn't infinitely recursive is it?

2009-07-31 Thread Matt Neimeyer
I like it... Thanks! On Thu, Jul 30, 2009 at 8:04 PM, Ben Dunlapbdun...@agentintellect.com wrote: I don't THINK I need to worry about circular mappings... but I'm not sure how to check for it if I did... Would the following work? It avoids recursion entirely and also checks for circular

Re: [PHP] 2 ifs embedded?

2009-07-31 Thread Jim Lucas
Miller, Terion wrote: On 7/31/09 10:14 AM, Bastien Koert phps...@gmail.com wrote: On Fri, Jul 31, 2009 at 10:59 AM, Miller, Teriontmil...@springfi.gannett.com wrote: On 7/31/09 9:53 AM, Bastien Koert phps...@gmail.com wrote: On Fri, Jul 31, 2009 at 10:28 AM, Miller,

Re: [PHP] 2 ifs embedded?

2009-07-31 Thread Miller, Terion
On 7/31/09 10:54 AM, Jim Lucas li...@cmsws.com wrote: Miller, Terion wrote: On 7/31/09 10:14 AM, Bastien Koert phps...@gmail.com wrote: On Fri, Jul 31, 2009 at 10:59 AM, Miller, Teriontmil...@springfi.gannett.com wrote: On 7/31/09 9:53 AM, Bastien Koert phps...@gmail.com wrote: On

Re: [PHP] 2 ifs embedded?

2009-07-31 Thread Miller, Terion
On 7/31/09 11:03 AM, Miller, Terion tmil...@springfi.gannett.com wrote: On 7/31/09 10:54 AM, Jim Lucas li...@cmsws.com wrote: Miller, Terion wrote: On 7/31/09 10:14 AM, Bastien Koert phps...@gmail.com wrote: On Fri, Jul 31, 2009 at 10:59 AM, Miller, Teriontmil...@springfi.gannett.com

Re: [PHP] 2 ifs embedded? (RESOLVED)

2009-07-31 Thread Miller, Terion
On 7/31/09 10:54 AM, Jim Lucas li...@cmsws.com wrote: Miller, Terion wrote: On 7/31/09 10:14 AM, Bastien Koert phps...@gmail.com wrote: On Fri, Jul 31, 2009 at 10:59 AM, Miller, Teriontmil...@springfi.gannett.com wrote: On 7/31/09 9:53 AM, Bastien Koert phps...@gmail.com wrote: On

Re: [PHP] 2 ifs embedded?

2009-07-31 Thread Jim Lucas
Miller, Terion wrote: On 7/31/09 11:03 AM, Miller, Terion tmil...@springfi.gannett.com wrote: On 7/31/09 10:54 AM, Jim Lucas li...@cmsws.com wrote: Miller, Terion wrote: On 7/31/09 10:14 AM, Bastien Koert phps...@gmail.com wrote: On Fri, Jul 31, 2009 at 10:59 AM, Miller,

[PHP] ForEach Range Problems

2009-07-31 Thread Miller, Terion
I have this script that works, just a couple tweeks needed... 1. I don't want it to default to A being selected 2. I need the number range part to only display one # sign not 10 of them, somehow I have to have it pull any record that does not start with alpha ?php

[PHP] Namespace resolution performance implications

2009-07-31 Thread Andrew Mason
Hi Guys / Girls, We are transitioning our framework to use the namespaces which are available in php 5.3. I found an explanation of the resolution rules here : http://www.sitepoint.com/blogs/2009/07/14/php-namespaces-import-alias-resolution/ ( also listed below) and I was wondering what the

[PHP] Regex Problem

2009-07-31 Thread Igor Escobar
Hi Folks, I have a serious problem. must create a regular expression against all that is between single quote or double quotes. Easy? Ok, i know, but i need that everything must to be too an single quote or double quote. If i have this SQL command: SELECT * FROM TSTRENIC.MEI_ACESSO WHERE

Re: [PHP] ForEach Range Problems

2009-07-31 Thread Bastien Koert
On Fri, Jul 31, 2009 at 12:53 PM, Miller, Teriontmil...@springfi.gannett.com wrote: I have this script that works, just a couple tweeks needed... 1. I don't want it to default to A being selected 2. I need the number range part to only display one # sign not 10 of them, somehow I have to

Re: [PHP] ForEach Range Problems

2009-07-31 Thread Miller, Terion
On 7/31/09 12:27 PM, Bastien Koert phps...@gmail.com wrote: $letter = isset($_GET['letter']) ? $_GET['letter'] :; echo 'div align=centerb'; foreach(range('A','Z') as $c){ ($letter == $c) ? printf('%snbsp',$c) : printf('a href=browse.php?letter=%s%s/anbsp;',$c,$c); } echo 'br';

Re: [PHP] ForEach Range Problems

2009-07-31 Thread Bastien Koert
On Fri, Jul 31, 2009 at 1:40 PM, Miller, Teriontmil...@springfi.gannett.com wrote: On 7/31/09 12:27 PM, Bastien Koert phps...@gmail.com wrote: $letter = isset($_GET['letter']) ? $_GET['letter'] :;  echo 'div align=centerb';  foreach(range('A','Z') as $c){   ($letter == $c) ?

Re: [PHP] ForEach Range Problems

2009-07-31 Thread Miller, Terion
On 7/31/09 12:43 PM, Bastien Koert phps...@gmail.com wrote: On Fri, Jul 31, 2009 at 1:40 PM, Miller, Teriontmil...@springfi.gannett.com wrote: On 7/31/09 12:27 PM, Bastien Koert phps...@gmail.com wrote: $letter = isset($_GET['letter']) ? $_GET['letter'] :; echo 'div align=centerb';

Re: [PHP] ForEach Range Problems

2009-07-31 Thread Shawn McKenzie
Miller, Terion wrote: On 7/31/09 12:43 PM, Bastien Koert phps...@gmail.com wrote: On Fri, Jul 31, 2009 at 1:40 PM, Miller, Teriontmil...@springfi.gannett.com wrote: On 7/31/09 12:27 PM, Bastien Koert phps...@gmail.com wrote: $letter = isset($_GET['letter']) ? $_GET['letter'] :;

Re: [PHP] ForEach Range Problems

2009-07-31 Thread Miller, Terion
--snip--- -- Well I almost have it with this, I keep getting an undefined index $letter error though and then it outputs the $menu how do I fix that //Create array with letters AND number sign $letters = range('A','Z');

Re: [PHP] ForEach Range Problems

2009-07-31 Thread Bastien Koert
On Fri, Jul 31, 2009 at 2:51 PM, Miller, Teriontmil...@springfi.gannett.com wrote: --snip--- -- Well I almost have it with this, I keep getting an undefined index $letter error though and then it outputs the $menu how do I fix that  //Create array with letters AND number sign            

Re: [PHP] ForEach Range Problems

2009-07-31 Thread Miller, Terion
On 7/31/09 1:56 PM, Bastien Koert phps...@gmail.com wrote: $letters = ''; Nope still gives the same error: Notice: Undefined index: letter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] ForEach Range Problems

2009-07-31 Thread Miller, Terion
On 7/31/09 2:00 PM, Miller, Terion tmil...@springfi.gannett.com wrote: On 7/31/09 1:56 PM, Bastien Koert phps...@gmail.com wrote: $letters = ''; Nope still gives the same error: Notice: Undefined index: letter Well getting closer with this but now my output menu is not a clickable link?

[PHP] Re: Regex Problem

2009-07-31 Thread Igor Escobar
The solution don't need to be with regex, if anyone can solve this with other way will be very helpfull . Regards, Igor Escobar Systems Analyst Interface Designer + http://blog.igorescobar.com + http://www.igorescobar.com + @igorescobar (twitter) On Fri, Jul 31, 2009 at 2:23 PM, Igor

[PHP] Re: Regex Problem

2009-07-31 Thread Shawn McKenzie
Igor Escobar wrote: The solution don't need to be with regex, if anyone can solve this with other way will be very helpfull . Regards, Igor Escobar Systems Analyst Interface Designer + http://blog.igorescobar.com + http://www.igorescobar.com + @igorescobar (twitter) On

Re: [PHP] ForEach Range Problems

2009-07-31 Thread Bastien Koert
On Fri, Jul 31, 2009 at 3:10 PM, Miller, Teriontmil...@springfi.gannett.com wrote: On 7/31/09 2:00 PM, Miller, Terion tmil...@springfi.gannett.com wrote: On 7/31/09 1:56 PM, Bastien Koert phps...@gmail.com wrote: $letters = ''; Nope still gives the same error:  Notice: Undefined

Re: [PHP] ForEach Range Problems

2009-07-31 Thread Miller, Terion
On 7/31/09 3:08 PM, Bastien Koert phps...@gmail.com wrote: On Fri, Jul 31, 2009 at 3:10 PM, Miller, Teriontmil...@springfi.gannett.com wrote: On 7/31/09 2:00 PM, Miller, Terion tmil...@springfi.gannett.com wrote: On 7/31/09 1:56 PM, Bastien Koert phps...@gmail.com wrote: $letters =

Re: [PHP] Re: Regex Problem

2009-07-31 Thread Shawn McKenzie
Igor Escobar wrote: No no, i need to make an regex to match the bold areas in my string. Anything between single quotes or double quotes (including quotes and double quotes). Understand? Regards, Igor Escobar Systems Analyst Interface Designer + http://blog.igorescobar.com +

Re: [PHP] Re: Regex Problem

2009-07-31 Thread Shawn McKenzie
Shawn McKenzie wrote: Igor Escobar wrote: No no, i need to make an regex to match the bold areas in my string. Anything between single quotes or double quotes (including quotes and double quotes). Understand? Regards, Igor Escobar Systems Analyst Interface Designer +

Re: [PHP] ForEach Range Problems

2009-07-31 Thread Miller, Terion
-snip--- So I'm almost almost there, but now when I click the # it shows me all records, is my foreach range not right? //Create array with letters AND number sign $letters = range('A','Z');array_push($letters, '#');

[PHP] Clean break.

2009-07-31 Thread Paul Halliday
Whats the cleanest (I have a really ugly) way to break this: [21/Jul/2009:00:00:47 -0300] into: date=21/jul/2009 time=00:00:47 Caveats: 1) if the day is 10 the beginning of the string will look like [space1/... 2) the -0300 will differ depending on DST or TZ. I don't need it though, it just

[PHP] Can a range be passed to a query?

2009-07-31 Thread Miller, Terion
I'm still struggling with using ranges... Can they be passed to a query somehow... I have this so far but it pulls nothing: //Show all with $letter not between A and Z if ($selectedLetter = #) { $other = range('0','9'); $sql = SELECT DISTINCT ID, name,

Re: [PHP] Clean break.

2009-07-31 Thread Phpster
On Jul 31, 2009, at 5:22 PM, Paul Halliday paul.halli...@gmail.com wrote: Whats the cleanest (I have a really ugly) way to break this: [21/Jul/2009:00:00:47 -0300] into: date=21/jul/2009 time=00:00:47 Caveats: 1) if the day is 10 the beginning of the string will look like

[PHP] Script to Compare Database Structures

2009-07-31 Thread Matt Neimeyer
I know I CAN hack something together but I hate to reinvent the wheel. I want to be able to compare the structure of two different clients databases that might be on different servers that are firewalled away from each other. Given the two structures it will list all the SQL commands needed to

Re: [PHP] Can a range be passed to a query?

2009-07-31 Thread Phpster
On Jul 31, 2009, at 5:24 PM, Miller, Terion tmil...@springfi.gannett.com wrote: I'm still struggling with using ranges... Can they be passed to a query somehow... I have this so far but it pulls nothing: //Show all with $letter not between A and Z if ($ $result =

[PHP] Re: Clean break.

2009-07-31 Thread Ollisso
On Sat, 01 Aug 2009 00:22:21 +0300, Paul Halliday paul.halli...@gmail.com wrote: Whats the cleanest (I have a really ugly) way to break this: [21/Jul/2009:00:00:47 -0300] into: date=21/jul/2009 time=00:00:47 ... Why not just use regexp ? For example: $string = long text.. multiply

Re: [PHP] Re: Clean break.

2009-07-31 Thread Paul Halliday
I was trying to stay away from regex as much as possible due to the overhead? I might be wrong here. This script will be parsing a lot of requests/sec. Thousands, maybe more, which it also needs to toss into a DB. I want to try and keep it as fast as possible. This is tricky when you don't know

Re: [PHP] Script to Compare Database Structures

2009-07-31 Thread German Geek
have you tried mysqldiff? ++Tim Hinnerk Heuer++ http://www.ihostnz.com (should be .org) Sponsors welcome to put ads under a linked to page. This is not automated just yet. Only image, swf or preferably text or short html ads, no animations please. Price negotiable. 2009/8/1 Matt Neimeyer

Re: [PHP] Can a range be passed to a query?

2009-07-31 Thread Paul M Foster
(Sorry, forgot to send this to the whole list.) On Fri, Jul 31, 2009 at 05:24:45PM -0400, Miller, Terion wrote: I'm still struggling with using ranges... Can they be passed to a query somehow... I have this so far but it pulls nothing: //Show all with $letter not between A and Z

Re: [PHP] Script to Compare Database Structures

2009-07-31 Thread Paul M Foster
On Fri, Jul 31, 2009 at 05:38:44PM -0400, Matt Neimeyer wrote: I know I CAN hack something together but I hate to reinvent the wheel. I want to be able to compare the structure of two different clients databases that might be on different servers that are firewalled away from each other.

[PHP] Problem: Writing into Files?

2009-07-31 Thread Parham Doustdar
Hi there, I've written a counter for my blog, which keeps the count of visitors in a file. However, when the visitors get too many, it resets to zero. Why? Here's the piece of code: [code] $f = $dir . '/view_counter' .EXT; $fp = fopen($f, r); $count =fgets($fp, 1024); fclose($fp); $fw =