PHP for data mining

starstarstarstarstarstarstarstarstarstar Rating: 0/5 (0 vote cast) print


i have this project to develop a website that will build customer profiles using data mining methods according to the previous transactions of the customer and visitors of the site i will be doing ...

i don't know how to implement this project. can some one suggest how to do it?

is it also possible to use PHP + MySQL to implement this project?

How can i implement the data mining methods here?

 : badge     Reply  

Replies (12)


HI :

We can help you.

Can you list all the information or the web data mining that you want to perform and prioritize them. E.g. if you have 10 different data mining queries or statistics that you will like to run, list the 10, from the highest priority to the lowest priority.


this is how my project should work:

visitors and registered members of the site will then log in on the site i will be doing. he/she may pick up and click several products of his interest posted on the site. i should keep track on this transactions and store it to perform mining on their behavior. what i should do is to perform atleast association rule among customers and clustering this data gathered. after mining the data i should be discovering rules among individual data. like for example ages 20-25 likes to visit and explore salad recipes (product A), or maybe customer 1 always pick product B or maybe a generalization that 80% from a particular place, let's say region 4, always explore products included in category C. Can you please help me what approach i should be doing.. how can i implement data mining here and where should i start? can sql alone perform mining? hope this visualizations may answer my questions..

thanks a lot!!

: badge    Reply


Hi :

You may start by implementing an architecture that uses cookies and sessions or any other similar solution to uniquely identify visitors to your site.

As a user clicks on a page, you can record the information on a database and then use association rules like apriori algorithm to find what kind of products visitors like to buy together.

Frankly, the framework that I will advise you to implement will be based on ASP.NET, C#/VB.NET and SQL Server 2000.

In ASP.NET, you can record the sections of a page corresponding to a unique product or catalogue information that the user clicks on.

This data will aid in path analysis of your visitors where you can analyze the pages that your visitors will click on through your website and the sections of the pages that they are likely to click.

I will open a new thread and discuss these architectures in a bit more detail.




i will share the fields of the database:

1. last name

2. age

4. gender

3. address/location

4. status

5. products receive/purchase

6. occupation

-- can you suggest any other field in the database so i can really gain useful hidden knowledge when i perform mining in it. also, should i provide another field called "transaction" to record the transaction or behavior of the user/visitor? can you please explain to me what exactly should i add in the fields of the database for me to capture transactions of the user and what other fields might be useful when i'll be mining the database..

Many Thanks!!!

: badge    Reply


Hi :


I would am willing to help you. However, I do not have diagrams that I can readily pass to you. Also, this web mining is a dynamic area. I do not have one single book or a collection of books that I can refer you to.

A lot of what I know was gathered over a period of time. Here is a link to an affiliate marketing website that I implemented using ASP.NET and SqlServer :

Their are definitely books out their and diagrams, etc. I would typically provide such a detailed architecture for a client.

However, moving right along, I have an ASP.NET component on this site at

It was designed using C# and uses association mining to predict what products customers for a store tend to buy together.

The basics are this :

1. Capture as much information as you can about your site visitors.

This may be easier in ASP.NET than in other frameworks, however, whatever web platform you are using, you are basically trying to record information about a site visitor using the querystring values and objects.

2. When a user arrives at your site, you identify him using cookies, etc. as a known entity or am anonymous user.

3. You will try and tarck which pages the visitor is views.

4. If you are using ASP.NET, through the use of Server and User Controls you can even determine the sections of the page that the user is clicking on and viewing using page fragmentation, etc.

5. If the user buys a product, of course you record the transaction. It could be as simple as Customer A bought Product B. Take a look at the sample database called Northwind that ships with Sql Server or Ms Access.

6. You can then run association rules to determine what producs customers like to buy together. If you record enough information about the customer, you can analyze the customers using clustering, etc. One Algorithm in Association Rule Mining is the Apriori Algorithm.

7. As a general rule, you have to implement a careful design as you could end up storing a lot of data if you have a lot of site visitors.

Please feel free to ask more questions.



can i ask for any sample database that was subject for data mining. I just want to have a basis how can i organize the transactions and informations i have gathered so that implementing mining would then be much clearer. Can you give me more tips and procedure on how to start this project and can you help me visualize more how mining will be done when i have the database (in which case i will use sql server) of records. What functionalities and characteristics does has that makes it easier to mine the database such as the sql server.

Thank you very much,


: badge    Reply

the CoEF link is not valid can you help me get ti,need it ,thinks

: liuan    Reply

Hi.. My name is Akhyar,

Im gonna take my undergrads final project in web usage mining.

Is there anyone could give me tutorials step by step to analize it?

please cantact me at 


Hi :

We have data mining samples on this site created using Visual Basic and C#.NET .

You can use these examples from ASP or ASP.NET and SQL Server.

You can definitely implement web mining using PHP and MySQL.

Is their any chance that you can switch to ASP/ASP.NET and Sql Server?

We can help by trying to answer the questions that you have as you implement the project.,



i was actually thinking to swith to asp and sql, but i have yet to learn those tools. for now, i have to know what best algorithm i can use to implement my project. i have to keep track of the online visitors and registered members of the website i will be doing and perform mining on the data i can capture. can someone help me figure out the problem and solution to tis project?

thanks a lot!

: badge    Reply


Hi :

I tried to explain it a bit more at this url :


thanks for the idea. can you email me any system diagram/architecture for this project so i may have the idea of the flow of the system.. Also, upon tracking the user of the website, you have told me i can directly record the transaction of the user in the database right? should i create another field in the database to accept and record the transaction or there is a function in ASP to generate it automatically..

can you please give me some related links and useful papers for me to read, that is relevant to my project.. also i need a system design and flow diagram to visualize the project well .. is it possible for you to mail me that?? ( my email add is )..

can you also give me a brief but clear description how can i perform data mining using association rules and clustering through and sql server ? can validate and provide the rules in it? what action in the database should i do to implement it? can alone perform the mining in the database? after what you have shared me before this reply, what's the next step should i do after implementing cookies and session to grab the transaction of each user..

i'm looking forward to have the answers to these questions so i can have the over all view of my project. Thank you so much.

: badge    Reply

Post A Reply

 Questions & Answers