473,396 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Send mail listing the maximum number of users online on a particular date

Hello All,

I have a table where i am maintaining the users' ip address and the date when they are accessing the website.

so its like i have 3 fields in the table like

ip_id - auto_increment not null primary key
ip_address - holds the ip address of the user browsing the site
date - the particular date when the user was online on the website

I now need to get the entire list of users and their ip addresses who browsed the website for a particular day.

and this list of users' ip addresses needs to be sent in a mail to the admin of the site.

Any ideas how to go about it?

Regards,
Dream2rule
Aug 24 '07 #1
3 1640
nathj
938 Expert 512MB
Hello All,

I have a table where i am maintaining the users' ip address and the date when they are accessing the website.

so its like i have 3 fields in the table like

ip_id - auto_increment not null primary key
ip_address - holds the ip address of the user browsing the site
date - the particular date when the user was online on the website

I now need to get the entire list of users and their ip addresses who browsed the website for a particular day.

and this list of users' ip addresses needs to be sent in a mail to the admin of the site.

Any ideas how to go about it?

Regards,
Dream2rule
Hi,

You could select the ip addresses frm the table with an appropriate where clause:
[php]
// $ldDate is defined as the date you are searching for
$lcSelect="Select ip_address from table_name where date = $ldDate";

// run the query
[/php]
You can loop through the resuls of the sql building up the message of your email.

The mail could be sent using the php mail() class. It's really a case of a simple SQL query followed by a loop to process the results.

Have a go at that and if you get stuck post your code and I'll try to help you out some more.

Cheers
nathj
Aug 24 '07 #2
i got the working of the mail but i need to know how do i sent it only once in a day i.e preferably all the users online throughout the day and their corresponding addresses needs to be sent to the administrator everyday.. I have the system date. Any help?
Aug 27 '07 #3
nathj
938 Expert 512MB
i got the working of the mail but i need to know how do i sent it only once in a day i.e preferably all the users online throughout the day and their corresponding addresses needs to be sent to the administrator everyday.. I have the system date. Any help?
It seems that you want to fire an event to gather data and send and email regarding that data based on time rather than page impressions or user clicks.

The low tech colution would be to have a process that does what you're after that you call manually - I said low tech. This would at least prove to you that the system works.

then moving on from there you need some sort of timer based process. This is not something I have ever done, but it does sound interesting. Perhaps your web host has some facility for this. I belive under Unix system Cron is the way to do this. As I say I have no experience in this at all so I don't pretend to be an expert here.

Sorry I can't be any more help.

Cheers
nathj
Aug 28 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Kevin Knorpp | last post by:
Hello. The account activation e-mails that I am sending to users who have registered at my site are getting filtered by spam blocking SW. However, some are getting through, but only 1 of 100 or...
4
by: Lovely Angel For You | last post by:
Dear Friends Hope you all doing great. I made a website where I am able to record how many users are online right now at my website ysing Session_Variables. Now I want to record the date when...
2
by: Kums | last post by:
What is the maximum permissible size of a database? Is there any limitation. What is the maximum # of tablespace's allowed in a database? Thanks for your response.
6
by: Sal | last post by:
I want to sale my Access 2002 program and charge per number of computers using it on the network.This is front/back end database. How can I limit maximum number of users and change it base on some...
1
by: accyboy1981 | last post by:
Hi, I currently looking into creating a website that is database driven in asp.net 2.0 and using C#. In creating this website there could be a maximum of 350 simulataneous accessing the...
8
by: King | last post by:
Hi I have following MS Acess query Here is the query ID Name Prgm ID Client ID Date Start Time End Time Minutes C4 Trisha TIP DEK0703 7 /7 /2006...
14
by: Professor Yonce | last post by:
I have made form for E-Mail. I have entered code but the Import system does not work. It has squiggly line underneath it showing it is not communicating. It Will not build. Public Class...
3
by: YMPN | last post by:
Hi Everyone, I'm deen from Riyadh. Please do help me with some problem i have. I have this formview control setup to recieved inputs from user (textbox, dropdownlist, others). After...
2
by: Wayne | last post by:
Is there a "best practice" maximum number of controls that can be loaded on to a tab control before things start getting messy and sluggish? I'm asking for a "best practice" maximum number across...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.