View Full Version : Need Website Help?
Koldplay
05-02-2006, 05:54 AM
Hello,
I design website for HCs on UK or US hotel.
I know PHP,mySQL,HTML and more.
I know how to do the DJSays Request Line Newsletter and Alert
If you want to hire me
PM Me
Thanks
Dan Williamson
05-02-2006, 04:21 PM
Hey,
Any proof on you knowing MySQL and PHP?
- Dan
iAdam
05-02-2006, 04:23 PM
I need to know the code that tells you how many people r online and how to track their ip's
Dan Williamson
05-02-2006, 04:40 PM
Hey,
Users online
<?
$remote = $_SERVER["REMOTE_ADDR"];
$file = "log.txt"
;
$timeoutsecs = 30;
$timestamp = time();
$timeout = ($timestamp-$timeoutsecs);
$fp = fopen("$file", "a+");
$write = $remote."||".$timestamp."n";
fwrite($fp, $write);
fclose($fp);
$online_array = array();
$file_array = file($file);
foreach($file_array as $newdata){
list($ip, $time) = explode("||", $newdata);
if($time >= $timeout){
array_push($online_array, $ip);
}
}
$online_array = array_unique($online_array);
$online = count($online_array);
if ($online == "1") {
echo "People Online: $online";
} else {
echo "People Online: $online";
}
?>
Create log.txt and CHMOD to 777
Taken off my site.
Display IP
<?php
function getIP()
{
if (isset($_SERVER))
{
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
{
return $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
return $_SERVER['REMOTE_ADDR'];
}
} else {
if (isset($GLOBALS['HTTP_SERVER_VARS']['HTTP_X_FORWARDER_FOR']))
{
return $GLOBALS['HTTP_SERVER_VARS']['HTTP_X_FORWARDED_FOR'];
} else {
return $GLOBALS['HTTP_SERVER_VARS']['REMOTE_ADDR'];
}
}
}
?>
- Dan
iAdam
05-02-2006, 04:42 PM
One prob I use freewebs it doesn't let you chmod or code php
Dan Williamson
05-02-2006, 04:44 PM
Hey,
Well you can't do it without PHP.
I suggest moving to a better PHP supported free host.
- Dan
iAdam
06-02-2006, 04:27 PM
Know any?
Dakara
06-02-2006, 04:51 PM
To display the users IP address (SSI):
<!--#echo var="REMOTE_ADDR"-->
You could try searching Google for a users-online script:
http://www.google.com/search?q=users+online
Sygon.
06-02-2006, 05:01 PM
To display the users IP address (SSI):
<!--#echo var="REMOTE_ADDR"-->
You could try searching Google for a users-online script:
http://www.google.com/search?q=users+online
Youneed php enabled josh .
Dakara
06-02-2006, 05:16 PM
Youneed php enabled josh .
That's not PHP?
Sygon.
06-02-2006, 05:24 PM
Thought it wud be coz it echos ;o
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.