Jump to content

060_VCW_606

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

060_VCW_606's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I figured it out, and I changed the deprecated part of the first snippet.
  2. There's no whitespace. I still have that output.
  3. The snipet with setcookie() is the only code in the PHP file.
  4. Execution of the second snipet returns this: Warning: Cannot modify header information - headers already sent by (output started at /home/valicom/public_html/test/boardinclude.php:1) in /home/valicom/public_html/test/boardinclude.php on line 6
  5. I'm trying to program a small system on my site revolving around the number count generated by a Perl script and output into a single-numbered text file. I'm using cookies; throughout the site (which is in PHP; the Perl part is not important in this matter), the computer compares the value in the cookie and the value on the text file to decide what to show: <?php $record = $HTTP_COOKIE_VARS["record"]; $file = "http://vcw.vali-ent.com/roleplays/count.txt"; $count = fopen($file, 'r'); $data = fread($count, 5); fclose($count); if (isset($_COOKIE['record'])){ if ($record > $data){ print("NEW!"); } else { print("No New"); } } else { print("Not Set"); } ?> My plan is to have the number update on a certain page using an iframe. And that the iframe only contains this snipet of code: <?php $file = "http://vcw.vali-ent.com/roleplays/count.txt"; $count = fopen($file, 'r'); $data = fread($count, 5); fclose($count); setcookie("record",$data,time()+604800); ?> The only problem is that the second portion of code doesn't work. Does anyone know what I'm doing wrong?
×
×
  • 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.