PDA

View Full Version : Anybody do me a favour?



Adzeh
01-01-2006, 01:42 PM
I have just set up a new project with Habbox Live and I need some PHP scripts to make availible to mass downloading :). +Rep if any of you can help.

Ok guys here is what I need:

A selection of good quality PHP scripts (in one PHP file) to include some of the more complex web statistics (user i.p, user native city etc..) along with all the necessary .txt files. The stats need to be 10/10 material and worth of a professional site.

Can you also include a "Read Me" file explaining to the user how to install and use these scripts?

Finally all of the above need to be put into a compressed (zipped folder) and either sent to me, or hosted on the internet so I can download.

This request is part of a new project for Habbox Live that I need to finish.

Anybody up to the challenge?

timROGERS
01-01-2006, 01:49 PM
I might do something :) I can do stats on downloads, but thats the only stat I really know apart from the easy ones

Adzeh
01-01-2006, 01:56 PM
Omg if you can give me the script for stats on downloads, and a little information on how to integrate it I would love you forever :p.

Luckyrare
01-01-2006, 02:21 PM
Tim has posted the coding for Downloads ;) Search the this forum... Ill try find it now :P

Got it! http://habboxforum.com/showthread.php?t=130988

timROGERS
01-01-2006, 02:32 PM
I have a way to improve that script with a bit of HTACCESS. So basically I can make it say song.mp3, but it runs it as PHP and then gives you the download.

Adzeh
01-01-2006, 02:33 PM
Thanks luckyrare but that is just a little bit hard to understand.

Anyway that is talking about making it from scratch, I need to integrate it inot an existing page.

Jamie.
01-01-2006, 02:42 PM
+rep for tim and luckyrare (if i can)
- luckyrare: for finding it :) [ i gotta spread some round b4 i can do ures soz :(]
- Tim: For a good guide/tutorial :)

Jamie.
01-01-2006, 02:42 PM
oops sorry i double click submit by accident :(

Adzeh
01-01-2006, 02:50 PM
Can we get back on topic please guys?

I need the stats inside compressed folders :).

Luckyrare
01-01-2006, 03:04 PM
Why dont you compress the folder on your PC and make people able to download it via Tim's script.

Dan Williamson
01-01-2006, 03:13 PM
I can't be bothered putting them into a .zip folder but here.

IP -


<?php
echo "Your IP: $REMOTE_ADDR";
?>

Users online -


<?

$timemax = "300";

$ipadress = $REMOTE_ADDR;

$timenow = explode (" ", microtime());
$timenow = $timenow[1];

include ("data.php");

$timedelete = $timemax;

$deleted = $deleted + $timedelete;

if ($deleted < $timenow){

$file = fopen("data.php","w+");
fputs($file, "<?PHP \$deleted = \"$timenow\"; ?>\n");

$number = count($visitor_b);

for ($tel = 0; $tel < $number; $tel++){
$visitor_a = $visitor_b[$tel];

$visitor_a[0] = $visitor_a[0] + $timemax;

if ($visitor_a[0] > $timenow)
fputs($file, "<?PHP \$visitor_b[] = array('$visitor_a[0]','$visitor_a[1]'); ?>\n");

}

fclose($file);

}
$visitor_b = "";

include ("data.php");

$number = count($visitor_b);

for ($tel = 0; $tel < $number; $tel++){
$visitor_a = $visitor_b[$tel];

if ($visitor_a[1] == $ipadress)
$save = "nee";

}

if (!$save){

$file = fopen("data.php","a");
fputs($file, "<?PHP \$visitor_b[] = array('$timenow','$ipadress'); ?>\n");
fclose($file);

}

$visitor_b = "";
include ("data.php");

$number = count($visitor_b);

for ($tel = 0; $tel < $number; $tel++){
$visitor_a = $visitor_b[$tel];
$visitor_a[0] = $visitor_a[0] + $timemax;

if ($visitor_a[0] > $timenow)
$online = $online + 1;

}

if (!$online)
$online = 1;

if ($online == 1)
print ("Users Online: $online");
else
print ("Users Online: $online");

?>

Refferer -


<?
echo "You came from: $HTTP_REFERER";
?>

Page load time -


<?
function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
$time_start = getmicrotime();
for ($i=0; $i <1000; $i++){
}
$time_end = getmicrotime();
$time = $time_end - $time_start;
$time = round($time,6);
?>

Then add

<?
echo ("Page loaded in $time seconds.");
?>

Hope they helped.

- Dan

Adzeh
01-01-2006, 03:29 PM
Oooh thanks alot dan +rep to be added as soon as I have spread it around :D.

Do I need a separate .txt file?

Dan Williamson
01-01-2006, 03:31 PM
Use a seperate .txt file and include them in the <DIV> that they're going in.

- Dan

Coding4Newbs
01-01-2006, 03:34 PM
Oooh thanks alot dan +rep to be added as soon as I have spread it around :D.

Do I need a separate .txt file?

Me too thanks dan ;)

Dan Williamson
01-01-2006, 03:35 PM
Alright man go on MSN.

As you blocked me before ROFL

- Dan

Coding4Newbs
01-01-2006, 03:39 PM
Alright man go on MSN.

As you blocked me before ROFL

- Dan

Okie :D done

timROGERS
01-01-2006, 05:03 PM
Later when/if I have time I will PM you the stuff. It wont be til tomorrow

Want to hide these adverts? Register an account for free!