I Cut My Finger Off & Request A Tutorial
Pictured to the left is my hand. Yesterday I was cutting an onion and missed and removed the tip of one of my fingers. Ok, not really, but I did cut my left index finger right on the knuckle all the way down to the bone.
My finger bled non stop for several hours & I thought about going to the ER, but can’t afford it. It’s slightly numb and very swollen, so no PHP tutorials today - I can barely type.
Request A Tutorial
I was going to code a tutorial request form today, but my finger rules that out. For now, if you want to request a tutorial, please send an email to naresh@eNaresh.com and I’ll try to write one within a few days. I want my tutorials to solve needs that are already out there, so requests are very important!
You can also request tomorrow’s tutorial by posting a comment. Also some ad opportunities will be available on eNaresh soon. Email naresh@enaresh.com for info. The hits are good!
PHP Tutorial: Using Twitter For Website Logins
For a recent freelance projcet, I needed to let people login to a website using their twitter account. I’ve decided to release a modified version of the code as a tutorial here on eNaresh.
If you’re unfamiliar with Twitter, it’s a social microblogging service. It has an extensive API and a huge user base. The code contained in this tutorial could be used to create a twitter application or addon.
As with all my tutorials, the instructions can be found inside the code - that way even copy and pasters have an opportunity to learn from the code. The instructions are placed inside the code as comments - lines of code starting with two backslashes (//).
PHP Tutorial: Load And Parse Awstats With PHP
Several times a day I log into cPanel just to look at awstats. It’s honestly getting kind of old, because I’m often just checking a few stats and logging off. I wanted a way to view my awstats statistics outside of the normal awstats page.
This tutorial will teach you how to load your awstats log file, parse it, and display some general stats using PHP. As with all my PHP tutorials, the instructions are placed inside the code with comments - meaning it will start with two backslashes.
You can download the source with comments here. However, I recommend reading the full post to determine your awstats log file URL.
You can view an example of this script here, showing EffenSweet.com’s Stats
Also, if you can help this get approved on Good-Tutorials by rating the tutorial, that would be amazing.
eNaresh Stats: Humorous Search Terms

I was looking through awstats this evening and saw quite a few search terms that I find hilarious, interesting, or downright disturbing. Here are a few of my favorites:
zulumonkey source
Zulumonkey.org was an old tutorial website. Anyone remember it? It was hacked several years ago by the group Cyber Crimes. The hackers released the code and apparently people are still looking for it.
can a 16 year old buy a blunt wrap at a gas station
No. Unless you’re crafty… This probably isn’t a story I should be telling, but screw it. To buy alcohol at a liquor store near me, I used to pretend I didn’t speak english when they asked for my ID. I would say “yes” and extend my hand, as if to shake theirs. After a few times, they got tired of arguing and started selling it to me. (eNaresh does not condone illegal activities, no matter how fun they may be.)
$25 amazon gift card survey
Apparently people use google to find survey’s they can fill out simply to win gift cards. It’s an interesting idea, but seems kind of stupid. There were quite a few similar queries.
death by caffeine
Wow, this is a very common query. I never thought this post would send that much traffic.
naresh cell phone number
What the f**k? Are you a stalker or something? (303) 588 2376. I hope this one can be explained…
Other Observations
- Lots of traffic has been sent to my review of SquareSpace.
- My CURL tutorials received quite a bit of traffic as well. (Introduction To CURL and Submiting Forms With CURL
- There were over 15 search queries containing the word “Rick Roll”.
Now go check your logs - I’m betting you’ll see some funny searches too. Post them in the comments!
Code Snippit: Post PHP Errors To Twitter
I don’t know about you, but I rarely check my error_log file for my websites. Ok, I never check it. Yesterday, I found out that a key page on one of my sites had a parse error that I didn’t know about it. I wanted to create a way to be notified of such errors.
Here’s a handy PHP code snippit for you. It’ll open your error log file and post the errors to Twitter.
For this code, you’ll need two twitter accounts:
- Your normal, personal twitter account. You can use this account with thwirl or other apps to get alerts with your errors.
- A secondary account just for posting errors to. I’ve created enaresh_errors for this purpose
You’ll also need to know the location of your error log file. I found mine at “/home/ragsites/enaresh/error_log”. CHMOD this file to “775″.
The final requirement is a server with CURL enabled. Shameless Plug: EffenSweet web hosting has CURL. So do most hosts.
The code can be found below. I saved mine as “twiterror.php” and set it up on a cron job to run each hour.
You can create a cron job running this file by adding this to your crontab:
0 * * * * wget -Ou URL_TO_YOUR_FILE
Or in cPanel:
You can see this script at work by going to twitter.com/enaresh_errors. If you have any errors with this code, please post a comment.
Would you be interested? + Personal Update
I was just wondering how many of my readers use Twitter. I’m considering writing a few tutorials for other uses of Twitter (website error monitoring, etc) but am not sure what the interest would be.
If you’d be interested in a series of tutorials for error reporting with twitter, please say so in the comments. I recently implemented this in a website, and it posts messages such as the following to twitter, allowing for faster customer service and error fixes.
Demo Error Trapping Tweet:
Error loading publisher reporting stats for user ID: 77 (file members/reports/2.xml)
Survey Results Update
The survey results are coming very soon. I’ve been working on it off and on, but my personal life has taken prescience. I’ve moved twice in the past 3 days (long story, don’t ask) and my laptop continues to have horrible problems (needs a new keyboard and power cable).
I just got a new phone to replace my lost one. If I usually have your number, please send me a text message or give me a call. 303-588-2376
I know this was a short update, but I just wanted to let you know what’s up and that I’ll be around a lot more now.
Last Day To Enter Survey Contest
Today is the last day to enter the survey contest. Tomorrow, the results of the survey will be posted (with graphs!) and the three winners will be announced.
Over 75 people filled out the survey. The winners will be determined by a PHP script (yes, the source will be posted so you can make sure everything was done fairly. Duplicate entries will be removed.
So, be sure to get your entry in before midnight tonight (MST / GMT-7). You can fill out the survey by going to eNaresh.com/survey.
Holy Crap - eNaresh Version One
I was looking through an old computer earlier today when I stumbled upon a folder called “My Websites”. I opened it and found the first two “versions” of eNaresh.com.
eNaresh.com was first registered in November, 2004. I wasn’t into web design very much then, so the content and designs are kind of odd. They were open source templates that I completely ruined by adding my own “flavor” too. I only had experience with MSN groups at the time, and used Microsoft Frontpage for everything - even creating tables.
You can view the old versions of eNaresh by going to eNaresh.com/retro and click one of the folders. Oh, and yes - I know they’re horrible. Thanks for pointing that out.
Enjoy!
EffenSweet Hosting Launched
I’m extremely excited to announce the release EffenSweet Web Hosting, a new web hosting company that I’m part of. It’s on a blazing fast new prepaid dedicated server with plenty of space and bandwidth.
Best of all, there are no hosting plans. You simply tell us what specs you need and choose between a shared or reseller account. Suggest your own price for the plan, and send it off!
Support tickets are handled directly through the control panel and should be answered by one of us within a few hours.
I’m eager to hear what you think! Please post a comment if you have any questions or comments. Find out more at EffenSweet.com.
I’m Back In Business
My laptop cable has been repaired and I’m back in business. I’ve been working on a few exciting new websites the past few days, and should be launching one sometime tomorrow!
I know I’ve said this already, but I’ll have a demo video of one of SiteRose’s features in a few days. I mentioned that a few weeks ago, but was unable to edit it because I’ve been using what’s quite possibly the worst laptop ever made.
Oh, and I don’t have a phone anymore, so no - I’m not ignoring your phone calls. I’ll be getting a new phone sometime this week most likely.






