gortron Posted March 3, 2009 Share Posted March 3, 2009 I wrote a PHP script a while back which sends me an email when Google sends a visitor to my site. The email shows the keywords the user searched for. Its a very basic script, a few people wanted to be able to use it for their own site so I put together a small site to allow people to download it. I have set this script up in an SVN repository, it is open source and I'd like to develop it further. I have plenty of ideas in the area of notifying webmasters by email/twitter etc of any Google activity on their site. Would anyone be interested in critiquing the code or interested in developing this script further? The site is http://whatsgoogleupto.com Quote Link to comment https://forums.phpfreaks.com/topic/147800-critique-this-small-open-source-app/ Share on other sites More sharing options...
blueman378 Posted March 16, 2009 Share Posted March 16, 2009 HI mate, Nice little script there, Ill have a look at it for ya. theres a few things i can add in for you. EG if the mail function fails, try sending via smtp, make it a little bit easier to update... OOP is great. ill update the list bit later. Quote Link to comment https://forums.phpfreaks.com/topic/147800-critique-this-small-open-source-app/#findComment-786230 Share on other sites More sharing options...
Albos Posted March 18, 2009 Share Posted March 18, 2009 Love the idea, can't really say anything about the code, all looks good to me. One thing i may add though is would it not be best to add the information to a database so the site admin could then see the information in the admin panel or something instead of emailing each time a new visitor arrives. Also maybe put a time limit on getting the data (1 hour or so) as this has the potential to be spammed quite easily. Just my thoughts but good luck with this, has some great potential Quote Link to comment https://forums.phpfreaks.com/topic/147800-critique-this-small-open-source-app/#findComment-787744 Share on other sites More sharing options...
gortron Posted April 2, 2009 Author Share Posted April 2, 2009 Hi guys, thanks for the feedback on it. I didn't add saving to a database because I assume a user is already using something like Google Analytics to record this info long term. This script is intended as an added tool for a user to be notified as it happens. @Albos, Could you explain the time limit/spammed easily comment? Quote Link to comment https://forums.phpfreaks.com/topic/147800-critique-this-small-open-source-app/#findComment-799876 Share on other sites More sharing options...
Albos Posted April 3, 2009 Share Posted April 3, 2009 For example, if a viewer of the site was to click on the link in google, then go back click again i presume this would then send 2 emails within a few seconds repeating this 100 times or so over a minute would then send 100 emails to the site owner which i would class as spam. Hoping you see what i mean. As a suggestion maybe in the script as soon as the user is logged coming from google onto your site assign a cookie and then when someone comes from google, see if the user has been logged in the last hour by checking if the cookie exsists. If not then log it as a visit and send an email then assign the cookie. Hope i explained this alright. Regards Albos Quote Link to comment https://forums.phpfreaks.com/topic/147800-critique-this-small-open-source-app/#findComment-800213 Share on other sites More sharing options...
gortron Posted April 3, 2009 Author Share Posted April 3, 2009 Hi Albos, I get what you mean. Thats a good idea, I'll add it in, Thank you. I've seen a little of this happen already. A user searches for something, arrive at a site and then seems to go back and do it again once or twice more. They're hardly trying to spam me. Quote Link to comment https://forums.phpfreaks.com/topic/147800-critique-this-small-open-source-app/#findComment-800510 Share on other sites More sharing options...
Albos Posted April 4, 2009 Share Posted April 4, 2009 Do not get me wrong, i mean its not intentional spam in the slightest but i would class this as spam non the less. If you need any help give me a shout, its a really nice project you got going here! Regards Albos Quote Link to comment https://forums.phpfreaks.com/topic/147800-critique-this-small-open-source-app/#findComment-801121 Share on other sites More sharing options...
twilightnights Posted April 4, 2009 Share Posted April 4, 2009 Love the idea, can't really say anything about the code, all looks good to me. One thing i may add though is would it not be best to add the information to a database so the site admin could then see the information in the admin panel or something instead of emailing each time a new visitor arrives. Also maybe put a time limit on getting the data (1 hour or so) as this has the potential to be spammed quite easily. Just my thoughts but good luck with this, has some great potential I agree. Email would be very intensive to have spammed with that, I guess if you created an account just for that, but output to a file or a DB would be ideal. The site itself looks nice though. Quote Link to comment https://forums.phpfreaks.com/topic/147800-critique-this-small-open-source-app/#findComment-801227 Share on other sites More sharing options...
jlhaslip Posted April 4, 2009 Share Posted April 4, 2009 What about Yahoo!, MSN and ASK ??? Any plans to add additional Search engines? I realize the value of Google, but there are options out there. Quote Link to comment https://forums.phpfreaks.com/topic/147800-critique-this-small-open-source-app/#findComment-801236 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.