php_self

mr_jodete

New Member
Messages
19
Reaction score
0
Points
0
I have a ad-free account and i would like to ask if is working the php_self script if a have the Intermediate PHP Configuration

It is because it was working before and now it is stuck.Im using it for counting how many times was viewed the page.
Any ideas?
 
Last edited:

mr_jodete

New Member
Messages
19
Reaction score
0
Points
0
right i give a try
Edit:
anyway how did u found out my ip?
 
Last edited:
D

dWhite

Guest
anyway how did u found out my ip?

It's just a simple scripted image that detects and displays various information about your computer such as; ip address, ISP name, operating system and browser.

Nothing to worry about.
 

mr_jodete

New Member
Messages
19
Reaction score
0
Points
0
i just wanted to know how did u do that?simple scripted image that detects and displays various information ?whats that?how can i get it?
 

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
An easy way to get a visitors IP is by doing the following.

PHP:
<?php

echo $_SERVER[REMOTE_ADDR];

?>
 

mr_jodete

New Member
Messages
19
Reaction score
0
Points
0
ok cheers.i will
Edit:
yeah but im looking for somethin with the php_self script
the ip tracker is working fine,the think that i want to make to work is the counter.
 
Last edited:

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
May I ask what you are talking about? Do you have a link to this script?
 

mr_jodete

New Member
Messages
19
Reaction score
0
Points
0
here is the code of the tracker
<?php
include ("connection.inc.php");
$connection = connect();
$page=$_SERVER["PHP_SELF"];
$ip=$_SERVER["REMOTE_ADDR"];
$date=time();
$query="INSERT INTO tracker(page,ip,date) VALUES ('$page','$ip','$date')";
mysql_query($query,$connection);
$query="SELECT count(*) FROM tracker WHERE page='$page'";
$result=mysql_query($query,$connection);
$views=mysql_result($result,0,"count(*)");
echo "This page has been viewed$views times";
?>
But this code is not doing nothing
 
Last edited:
Top