473,785 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

13 New Member
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 1656
nathj
938 Recognized Expert Contributor
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="Sele ct 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
dream2rule
13 New Member
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 Recognized Expert Contributor
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
2250
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 so. Here is an e-mail with full header that was blocked by Yahoo! (below that will be one that did not go through). Please help. Thanks. This one got by the spam filter: X-Apparently-To: kknorpp001@yahoo.com via 216.136.174.83; Sat,
4
1995
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 I had maximum number of users online at onetime. Any idea how can I do that.
2
28600
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
1689
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 kind of activation code. Thanks!
1
2222
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 website/database. My question is in using ASP.NET and SQL Server 2005 can they handle 350 simultaneous users? If not what is an alternative? Thanks in advance
8
4012
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 10:00:00 AM 12:00:00 PM 120
14
2295
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 Form3Bio1 System.Net.Mail.SmtpClient Imports System.Net.Mail ' This line before ' does not work. I have the rest of code to try if and when I am able to get System working. ' I XXX out certain entrys below just for this publication.
3
4516
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 inserting, I want to send the data via email, the problem is how do I do that?
2
4273
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 all tabs and not the maximum number that is theoretically possible. I figure that trying to add lots of controls to lots of tabs must affect performance at some point. Any help is appreciated.
0
10341
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10155
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8979
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5383
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2881
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.