php - Concept & Algorithm: How to record only single URL for widget? -


I created a widget for my web application to get the user's code and paste that website to that website and save my widget Has worked on some websites like Twitter, Digg and other social widgets.

Based on my widget post, postid for a post: 234) I am providing a single widget, so anyone can embed the widget on their website.

Now I should know that for all the posts posted to my post and for which post? For this I have entered the URL of the site when my widget starts (Ollod), but the problem occurs when a person keeps the widget in the normal sidebar of his blog or website. I am recording the URL every time and so if he If there is a blog in the sidebar, then it is recording the URL for each post which is making a duplicate.

Can anyone help on this? How should I go so that I have the same record for any widget on the site?

I think it's a bit difficult to do something like that. Here are some ideas that pop up the mind

For example, when users receive widgets, users can ask to input their site's URL, or track the widget domain or subdomain Can, thus give fewer URLs.

Simply tracking domains can be a problem clearly if the actual site is domain.com/sitename/, and there may be more than one site under the domain. In that case, you can try to find the highest general directory to do something like this:

You have several such URLs: domain.com/site/page1, domain.com/site/page2, and Similarly The most common directory here would be domain.com/site

I do not think it will always work correctly or give full accurate results. For accuracy, I think that when users download the code for the widget, the user is the best way to tell the best for the URL.

EDIT: New idea - just create a unique ID for each user, it can be done only by taking the current timestamp or something, and by hiding it in the code snippet that the user wants to copy By the way you can track your own ID and appear in any URL and domain, it can be grouped under.

If you have an ID that does not get hits in weeks or weeks, then you can remove it from your database, and thus avoid filling it with unused id.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -