Jul 26, 2008

Basic Question

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > PHP Programming

free web hosting

Basic Question

Goosestaf
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 Trap17)
If needed i can send the script so you could maybe understand what ima skign more.

Cheers

Reply

LuciferStar
QUOTE(Goosestaf @ Nov 12 2004, 10:17 AM)
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 Trap17)
If needed i can send the script so you could maybe understand what ima skign more.

Cheers
*



JUST put your script on where your other html files are.
no need to configure anything of your website.

Reply

Goosestaf
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
QUOTE
///////////////////////////////////////////////////////////////////////////////////
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://www.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://www.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
///////////////////////////////////////////////////////////////////////////////////

 

 

 


Reply

LuciferStar
QUOTE(Goosestaf @ Nov 12 2004, 12:52 PM)
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
*



Just put them where you want.

Reply

Spectre
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.

Reply

filipc
Hi,

You can change extension to .php , but you need to ope your file and to change links. If link is some.html , change it to some.php ...


bye...

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics
Looking for basic

Searching Video's for basic
advertisement



Basic Question



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE