Jump to content

bluemonkey519

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Everything posted by bluemonkey519

  1. I like it a lot.. It does exactly what it needs to without all of the extra junk on the screen trying to sell me a million domain names. nice work!
  2. Overall, I think it looks good. The header is too larger, though. The banner is only using about half of the height. Also the search bar is displaying too far to the right.
  3. The site looks really good. I would maybe make the banner a little larger to fill in some of the empty space in the header, though. The banner really doesn't stand out.
  4. I would like the thousands separator to be in the actual .txt file, so that if I display the counter on another page, it shows the comma. I cannot seem to get it to write the thousands separator the actual text file.
  5. Hi All, I am not quite sure if this is possible - but here goes. I have a webpage hit counter that uses PHP and saves the counter totals in .txt files. I have gotten the code to print out the comma (thousand separator) fine on the page, however, I would like to have that comma in the text file also. I display the counters on separate pages using <?php include("file.txt");?> and the counter shows up as "12345" when I'd like it to read the text as "12,345". Basically, I just want that comma written to the actual text file if possible so that when it's included on a web page, it displays the thousands separator. Any help would be great. Thank You! Here is a portion of my code: /* Turn error notices off */ error_reporting(E_ALL ^ E_NOTICE); /* Get page and log file names */ $page = input($_GET['page']) or die('ERROR: Missing page ID'); $logfile = 'logs/' . $page . '.txt'; /* Does the log exist? */ if (file_exists($logfile)) { /* Get current count */ $count = intval(trim(file_get_contents($logfile))) or $count = 0; $cname = 'tcount_unique_'.$page; if ($count_unique==0 || !isset($_COOKIE[$cname])) { /* Increase the count by 1 */ $count = $count + 1; $fp = @fopen($logfile,'w+') or die('ERROR: Can\'t write to the log file ('.$logfile.'), please make sure this file exists and is CHMOD to 666 (rw-rw-rw-)!'); flock($fp, LOCK_EX); fputs($fp, $count); flock($fp, LOCK_UN); fclose($fp); /* Print the Cookie and P3P compact privacy policy */ header('P3P: CP="NOI NID"'); setcookie($cname, 1, time()+60*60*$unique_hours); } /* Is zero-padding enabled? */ if ($min_digits > 0) { $count = sprintf('%0'.$min_digits.'s',$count); } /* Print out Javascript code and exit */ echo "document.write('".number_format($count)."');"; exit(); } else { die('ERROR: Invalid log file!'); }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.