Jump to content

Questions in PHP


freddykhalid

Recommended Posts

Hi everyone, I'm new to the PHP language but I love it and it's becoming quite an addiction to me. I'm supposed to build a website with many features with some that I haven't understood. So help is required please.

The features I don't know how to create are the following:

1)Display a stopwatch time counter for the time elapsed since the visitor accessed the site.

2) Switch the visitor automatically to the relevant version of the Web site according to his browser type (IE or Mozilla)

3) Display how many visitors are currently on the website

4) Display the visit number for recurring visitors

5) Notify the webmaster via Email or SMS everytime someone accesses the secure area of the website using authentication

6)Show a simple log of the user surfing habits.
The log should include the pages visited by this user and the duration of his stay on each page


I am using Wamp web server currently until moving this onto the server.
Help required ASAP.
Link to comment
Share on other sites

Umm... so do you have any ideas? Have you tried anything yet, or do you expect us to sit here and just spit code back at you?

I'm not going to write code for you, but I can tell you how to do it:

1) PHP can't display a timer live on the page, but you can log the time they showed up on the site in a database and everytime they access another page, do a simple subtraction.

2) You can get some browser information from the headers, and send them to specific portions of the site depending on the browser, but you should really be able to develop a website that works across all browsers, except for maybe a few features that might use something like ActiveX, which would require IE.

3) Everytime someone access a page, update a record with their IP with a timestamp. Then you just run a query that grabs everyone that has been active in the past 15 minutes.

4) When someone logs on, update your table that contains the IP, but check to make sure that they haven't been active within X amount of time.

5) Use the mail() function for email, I'm not sure how to do SMS.

6) Track pages used by each IP in another table. Showing how long they were on the site is tricky, since it will have to be based off of their last action, unless you fire off an AJAX event in the background that will run as long as the user has the browser open.

You sound like you're in over your head. You might want to get a book on MySQL and PHP.
Link to comment
Share on other sites

[!--quoteo(post=364521:date=Apr 13 2006, 11:01 PM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ Apr 13 2006, 11:01 PM) [snapback]364521[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Umm... so do you have any ideas? Have you tried anything yet, or do you expect us to sit here and just spit code back at you?

I'm not going to write code for you, but I can tell you how to do it:

1) PHP can't display a timer live on the page, but you can log the time they showed up on the site in a database and everytime they access another page, do a simple subtraction.

2) You can get some browser information from the headers, and send them to specific portions of the site depending on the browser, but you should really be able to develop a website that works across all browsers, except for maybe a few features that might use something like ActiveX, which would require IE.

3) Everytime someone access a page, update a record with their IP with a timestamp. Then you just run a query that grabs everyone that has been active in the past 15 minutes.

4) When someone logs on, update your table that contains the IP, but check to make sure that they haven't been active within X amount of time.

5) Use the mail() function for email, I'm not sure how to do SMS.

6) Track pages used by each IP in another table. Showing how long they were on the site is tricky, since it will have to be based off of their last action, unless you fire off an AJAX event in the background that will run as long as the user has the browser open.

You sound like you're in over your head. You might want to get a book on MySQL and PHP.
[/quote]

I really thank you for your reply. I'm sorry if I offended but you can't imagine the huge amount of work that I have, that's why I'm asking over the internet which is the first time. I am currently developing a php website so I do know what I'm doing. The things I mentioned are the issues I don't know how to do only. In other words, this is a small part of a very big website my friend so I am trying my best.

About the mail function, do you have a URL where I can configure this function? Because it doesn't seem to be working for me.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.