Jump to content

Critique this small open source app


gortron

Recommended Posts

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

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

  • 3 weeks later...

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.