How to have my web site send me an SMS/Email when somebody visits
I would like to be notified each time somebody visits the site, either by email, or (better) by SMS. The web site uses WordPress (self hosted) so if there is a plugin for this great. If not I can add PHP code as needed.
Any ideas? Free service is best.
You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.
M$6 Answers
One way is to use this function:
http://codex.wordpress.org/Function_Reference/wp_mail
wp_mail( $to, $subject, $message, $headers, $attachments );
You need to find a way to add the function call at the right point in your code so it gets invoked exactly when you want. You can do that by adding it somewhere in the template code if you know your way around that.
Alternately you could use a plug-in like Sniplets. which has an easy way to specify small snippets of code and define where they should be invoked.
http://wordpress.org/extend/plugins/sniplets/
If you use Sniplets, test carefully to a) make sure it is working as expected and b) you have not opened any holes for PHP injection attacks.
Another thing you might want to look at, but which I haven't played with yet, is this...
http://wordpress.org/extend/plugins/hookpress/
It allows you to do things like make API calls to web services when certain "events" happen in Wordpress. For example, you could send yourself a Twitter msg whenever someone looks at any page on your site.
I think this is a powerful tool that is worth getting to know, but have not had time to have a look at it.
You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.
M$http://www.mabzy.com
You can get the Mabzy button here to allow your visitors to check in:
http://www.mabzy.com/get_button.php
You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.
M$It works incredibly well.
The trick that makes this all possible is to send a text message to _yourself_ in googlevoice to get your own 406 number and customized textable email address .
You can read about what 406 is in this forum post.
http://www.google.com/support/forum/p/voice/thread?tid=22e341d7f6e3694a&hl=en
Everything is instantaneous since the Hummingbird delay is NEVER more than 20 seconds, always usually instant. Both gmail and googlevoice are *push* based services which equals 0 Delay. Since you get unlimited texting with google voice, I setup a rule to have all of my text's sent to yahoo mail and i can check that for free with my rogers pre-paid phone.
Setting up raindrop and hummingbird is no small task but well worth the time and effort.
A word of caution they are both "pre-alpha" 's so dont expect it not to be a tedious self serving optimization process.
Granted if one link in the chain breaks then you are SOL , its a risk you need to be willing to take however.
My solution to this is to try and squid out and setup failovers as best you can, not all gmail yahoo and google voice accounts are served on the same server. And these days hosting is not that expensive at all.
Good luck finding what works best for you.
PS: Please note as far as i know you can only send txt email from your googlevoice email address from your google account itself for that i use zenbe
http://mnutt.github.com/hummingbird/
https://wiki.mozilla.org/Raindrop/Install
Google Voice
GMAIL
My own personal nightmares and late nights racking my brain figuring out a realtime solution to the exact same question.
You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.
M$Gary, just to update on this googlevoice is now open and free to use to the public, no more waiting for invites.
Official announcement is here .
http://googlevoiceblog.blogspot.com/2010/06/google-voice-for-everyone.html
yep, Its a lot of info to take in, the long and the short of it is google voice can be a very powerful service if used properly. They get their bandwidth from bandwidth.com and the service was born from sipgate.
They also have canadian support now!
I read that whole 406 page and it makes no sense to me...so I have to ask, because I'm that tech savvy--does that mean my virtual office--a GV number, also has a number in Montana (406)?
http://email.about.com/od/emailprogrammingtips/qt/How_to_Send_Email_from_a_PHP_Script.htm
Just customise the body of the email to suit you and make the website run the php whenever it is loaded. The only downside is that you will receive an email every time the user reloads the page. If you want to figure out if the user is unique then you could retrieve and send their IP with the email:
http://www.plus2net.com/php_tutorial/php_ip.php
or alternatively you could use cookies to remember the visit:
http://www.w3schools.com/PHP/php_cookies.asp
You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.
M$Get the power and freedom to monitor your website with just three clicks.
Website Monitoring Expert is an automated multithreaded tool that keeps a close and constant watch over your website. It can monitor different types of Internet services, including Website, Secure Website(HTTPS), Mail server and FTP server. When your website is detected inaccessible, loads improperly or responds excessively slow, Website Monitoring Expert will send an immediate notification to you. It can even run previously specified applications automatically! You define the interval of time that Website Monitoring Expert provides you with real-time reports and charts, allowing you to easily understand and evaluate your website's performance.
You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.
M$You would also use PHP to send the email or an SMS with that information. Most wireless phone carriers allow you to send SMS through email so in reality all you need is to send an email with the PHP mail() function. For example, if your carrier is Verizon, sending an email to number@vtext.com will send you an SMS message.
The next problem for your particular situation is that you can not insert PHP code inside of the Wordpress software. Therefore, you would have to insert the php code by editing the file in question.
I hope this helps with your question.
You can leave an optional "tip" with Mahalo's virtual currency, Mahalo Dollars. If you are asking a difficult question that might require some research, or if you'd like a wide variety of feedback, a higher tip often leads to more answers to your question.
M$




Excellent - that's exactly what I was looking for. And it's a WordPress function too.
I'm going to throw that inside of so i won't get the email when I visit.
Like I said it's a low traffic site and I do want to get an email for each page visited.
Btw, an afterthought.... people might not visit often, but when they do, they might look at several pages I guess.
So if you don't want to get a msg for every page they look at, you would need to write a little bit of code to e.g. send only one msg per IP address per day.
On the other hand if you're just sending emails maybe it's fine to get a bunch of msgs, one per page viewed.