Jump to content
xisto Community
Sign in to follow this  
Goosestaf

Basic Question

Recommended Posts

I have a premade php script and what to use it on my site.Could anyone go through the simple stages of configuering a site for php and where to put parts of a script in the ftp of the webhost (I.E Xisto)If needed i can send the script so you could maybe understand what ima skign more.Cheers

Share this post


Link to post
Share on other sites

I have a premade php script and what to use it on my site.

Could anyone go through the simple stages of configuering a site for php and where to put parts of a script in the ftp of the webhost (I.E Xisto)

If needed i can send the script so you could maybe understand what ima skign more.

 

Cheers

<{POST_SNAPBACK}>


JUST put your script on where your other html files are.

no need to configure anything of your website.

Share this post


Link to post
Share on other sites

Really? its that easy?

Im guessing i have to chnage the extension to .php yes?

 

Below is the read me for the file, just incase anything else needs to eb done because that seems to easy

///////////////////////////////////////////////////////////////////////////////////

WakCounter + UserOnline Script Version 1.1

 

Script by Katie http://luved.org/

 

This script is linkware and can be used or modified as long as all credit is

left attached to this file and a link is placed on your website to

http://luved.org/

You are forbidden to sell or distribute this script without permission by

it's creator and if a bug is found, report to scripts@luved.org

///////////////////////////////////////////////////////////////////////////////////

 

Version 1.1

Updates:

03-05-04

-> Added the ability to set a starting counter number

///////////////////////////////////////////////////////////////////////////////////

Description:

This script displays the number of users online, the highest number

of user online that day and a counter that records unique hits by IP

address. You can choose to display any of these information on your

site or none at all if you wish to keep your counter invisible.

 

Files in this zip:

  counter.php -> example page for displaying code

  counter/useronline.php  -> useronline script

  counter/useronline.txt  -> records users online

  counter/stats.txt  -> records the stats for counter

 

Installation:

Step 1: Upload all the files. Make sure you leave

useronline.php

useronline.txt

  and stats.txt

  in the counter/ folder. Place counter.php in your root

  directory.

 

Step 2: CHMOD useronline.txt and stats.txt to 777 in your FTP program.

 

Step 3: To add the counter to your webpage ->

 

  Place the following

  code at the VERY begining of your page (It must be placed at

  the very first line). This means that if you want your counter to

  be displayed on index.php you place this line at the beginning of

  index.php:

 

  <?php include_once('counter/useronlinecounter.php');?>

 

  The above code assumes you have left

useronline.php, useronline.txt and stats.txt in the

  counter/ folder

 

  You place the following between the <BODY> tags of your webpage.

  This line displays the number of users online

 

  <!-- Display user online-->

  <?php visitor('online')?> online.

  <!-- End User online-->

 

  The following displays the highest number of users active that day

 

  <!-- Most active user online-->

  Most Active At One Time Today: <?php visitor('mostactivetoday')?>

  <!-- End most active user online-->

 

  The following displays the counter

 

  <!-- Counter since date -->

  <?php visitor('total')?> hits since <?php visitor('sincedate')?>

  <!-- End counter since date -->

 

  Final step! Please remember to save the your file with a .PHP extension

  If you don't do this, your script will not work.

 

Additional Note:

  Set starting count:

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

  If you want your counter to start from a certain number, in your browser

  go to counter.php?starthits=(hit number)

  For example if I wanted my counter to start at 100, I would go to

  http://myDomain.com/counter.php?starthits=100

  in my browser.

  You should see a message confirming that the counter has been set to start.

  NOTE: You can only set the starting number ONCE, if you want to change this

  more than once, you'll need to reupload a blank stats.txt file.

 

  Change date format:

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

  If you want to change the date format displayed for 'hits since "this date"'

  Open useronlinecounter.php in a text editor

  Go to this line:

 

  $dtFormat = "d-M-Y";

 

  Change what is in between the double quotes " " to your preferered date format.

  Use this manual

http://php.net/manual/en/function.date.php

  to help you change it to a date format that you want.

 

///////////////////////////////////////////////////////////////////////////////////

// Find a bug? Please email me at scripts@luved.org

///////////////////////////////////////////////////////////////////////////////////

Share this post


Link to post
Share on other sites

You have to give the files an extension that has been set to be passed along to the PHP engine. This is done within the Apache configuration file (httpd.conf), and can be done within cPanel under 'Apache Handlers'. I like to associate my .html files with PHP, so that I can give all pages a .html extension. But that's just me.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.