Jump to content


Photo

php Counter...free for everyone...no help needed


  • Please log in to reply
7 replies to this topic

#1 Humpty

Humpty
  • Members
  • PipPipPip
  • Advanced Member
  • 132 posts

Posted 15 March 2006 - 02:31 PM

The forum kept giving me an error when trying to submit the code as part of my post, (the following 4 to 6 replies will verify this)

Instead I have had to set the code on a server where people can see it.

As such if you want to update it then I would suggest you give me the code to also put on the server or do the same as I have and place a link to it.

Here is the links:

This is the code:
[a href=\"http://www.oznett.com/helpfull/php\" target=\"_blank\"]http://www.oznett.com/helpfull/php[/a]

This is an example:
[a href=\"http://www.signsone.com.au\" target=\"_blank\"]http://www.signsone.com.au[/a]

Moderators: This was not a shamless self promotion or anything of the sort.

If the forum actually let me submit my code in my initial post then these links would not be there.
- Humpty
  #> Where does the light go when it goes out?

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 15 March 2006 - 02:32 PM

Yeah... I think there are some issues ATM, Ive had a few wird posts and timeouts. Maybe just describe your problem?

#3 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 15 March 2006 - 02:36 PM

[!--quoteo(post=355355:date=Mar 15 2006, 09:31 AM:name=Humpty)--][div class=\'quotetop\']QUOTE(Humpty @ Mar 15 2006, 09:31 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Why do i get a permissions error if I try pasting my code?
[/quote]

i noticed the other day that when i tried to post any full documents with doctypes or headers of any sort i'd get bumped. maybe you could just provide a link to a highlight_file() version of you script.
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

#4 Humpty

Humpty
  • Members
  • PipPipPip
  • Advanced Member
  • 132 posts

Posted 15 March 2006 - 02:49 PM

[!--quoteo(post=355360:date=Mar 15 2006, 09:36 AM:name=obsidian)--][div class=\'quotetop\']QUOTE(obsidian @ Mar 15 2006, 09:36 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
highlight_file() version[/quote]

DUH huh?

What is that?

(also I don't know if it, (my script) works....it worked here on my test server but when I uploaded it it isn't working...I even tried the permissions. It just doesn't seem to do anyting..no errors or nothing.)


This is the error I get trying to add my code (with or without specifying it as code

Forbidden
You don't have permission to access /forums/index.php on this server.


--------------------------------------------------------------------------------

Apache/1.3.33 Server at www.phpfreaks.com Port 80

I'm a knob...the script does work

I just didn't have PHP enabled on the webserver....still can't post the script here though...help me...I want to share it.
- Humpty
  #> Where does the light go when it goes out?

#5 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 15 March 2006 - 02:50 PM

[!--quoteo(post=355362:date=Mar 15 2006, 09:49 AM:name=Humpty)--][div class=\'quotetop\']QUOTE(Humpty @ Mar 15 2006, 09:49 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
DUH huh?

What is that?
[/quote]

highlight_file() is a function that will output the source of the file you pass to it highlighted to show PHP syntax. for instance, if i wanted to show you the source of a file called "myTest.php", i'd actually point you to a file called "myTestSource.php", and the source of that page would simply be:
<?php
highlight_file("myTest.php");
?>

You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

#6 Humpty

Humpty
  • Members
  • PipPipPip
  • Advanced Member
  • 132 posts

Posted 15 March 2006 - 03:03 PM

ok

Here is the links:

This is the code:
[a href=\"http://www.oznett.com/helpfull/php\" target=\"_blank\"]http://www.oznett.com/helpfull/php[/a]

This is an example:
[a href=\"http://www.signsone.com.au\" target=\"_blank\"]http://www.signsone.com.au[/a]

Moderators: This was not a shamless self promotion or anything of the sort.

If the forum actually let me submit my code in my initial post then these links would not be there.


- Humpty
  #> Where does the light go when it goes out?

#7 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 15 March 2006 - 03:12 PM

i would recommend one alteration... keep a flat file with the IP numbers of your visitors so that it doesn't continue to increment with every refresh of the page. if you filter out IP addresses, you can at least be sure that you'll only count each person ONCE per visit.
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

#8 Humpty

Humpty
  • Members
  • PipPipPip
  • Advanced Member
  • 132 posts

Posted 15 March 2006 - 09:50 PM

I do that when I use a database. I record IP time date and often which page, or in the case of the online shop i'm doing which catagory or products specifications. I have also set it up to record sites that use a ?xx=yy at the end of a link so we cansee where they are comming from.

This was my first ever attempt at writting to file. Signsone as above is a hosting customer of mine, (you don't have to be smart to sell hosting btw).

His plan did not include a database and I needed an alternative small, quick and easy method. This suited just fine :D
- Humpty
  #> Where does the light go when it goes out?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users