MineCraft RCON via PHP

Today I went looking for examples of how to talk to a minecraft server via RCON. There is not a lot out there, and that surprised me.  I did eventually find a PHP script that worked, but it required the modification of an existing class.  I don’t like modifying someone else’s source class files to make a program work, that is why PHP has the ability to extend the class.   What follows is a simple program, that extendis the verion 1.0  rcon.class.php from http://fremnet.net/article/199/source-rcon-class and connects to a minecraft 1.2.3 server and executes the console command “say”, the result is returned in a string.   I hope this example helps others out. See the example after the break.
Continue reading

Outward bound

Here I am sitting in the airport getting ready to fly to phoenix.  This trip is my yearly trip for work and should be a good experience. I vow to avoid kidney stones or other medical stuff this trip.
So far I’ve not had any real apprehension or major worries.

The metal detector didn’t luke my belt, the first time that’s ever happened.

There was an elderly gentleman and his wife behind me who tried to get through security with a golf club… The TSA agent sounded utterly shocked when he had to explain it to the mans wife.

ATTiny85 WAV Audio player for Halloween

It has been ages since I last posted. I wont get in to the reasons for it right now. Lately I have been working on a project for next years Halloween fun.

A few years ago I built a “Lightning Box” based upon a color organ circuit, and a halogen flood light. The unit works, but is a bit clunky, and relies upon an external CD player boom box unit I bought at the Dollar store for $5. The whole contraption definitely could use some re-working.

The current plan is to make the unit fully self contained (with the exception of the speakers) and solid state. The C player will be replaced with a audio player circuit I located that is based upon the ATTINY85 processor. I also plan to remove the amplifier board from a set of old computer speakers, combine that board with the audio player, and then feed the amplified audio into the color organ as well as the speakers. This entire collection of hardware should be able to be housed in a standard Carlon 4x4x4 PVC watertight junction box. More on that later…

I have attached a picture of the working prototype Audio board.

A young fan – Part 2

Sunday afternoon about thirty minutes before our final show, I was getting a drink of water when a little boy in full pirate regalia came running up to me. He began to chatter away, and I turned and knelt to listen.
“I have a treasure chest just like you do!”
Now at this point, I didn’t recognize this child, but since my treasure chest is almost always in my haversack and hidden this had to be a kid I had interacted with before. He proceeded to pull out a small hand carved wooden box from the bag he was carrying over his left shoulder.
“See!!!”, He proclaimed triumphantly!
“Oh yes that is indeed a fine treasure chest !”, I responded. To my side now appeared Clare De Luna, also happily enjoying the display of treasure. I looked into the treasure box, and noticed a mini message in the bottle, and a very familiar plastic gold coin alongside another gold coin, a few fairy godmother stones and some small copper colored coin shapes.
I instantly recognized the treasures as those belonging to my little friend from the day before.
He happily exhibited his treasures one by one to both of us, as we looked on with excitement. When he got to the small copper colored coins he explained that his dad made them for him. I felt a presence behind me and glanced back to see Dad now watching this display. The boy’s fingers fondled a small grey brown slightly polished stone. He looked up to his dad for a moment as if to get approval, or perhaps to draw strength. Dad, sensing the trepidation said, “we have been looking all over for you all afternoon”
“You have? Well, I’ve been around , we must have just been missing each other.”
The ice sufficiently broken, and courage mustered, the boy chimed in, “I want to give you something”
“Oh little one, you don’t have to give me your treasure.”
At this he looked slightly unsure and glanced to dad for advice. Dad nodded.
The boy gently removed the stone from his treasure chest and handed it to me. I took the gift with great flourish and treated it as I do all gifts from the little friends, like it was made of the most precious materil on the planet.
His father then explained that the boy had searched all through the house the previous day after they got home, and then continued all morning trying to find a suitable gift for the pirates he met. He finally decided to pick out two favorite rocks from his rock collection and bring them to us.
I nearly melted right there.
After this, the boy looked at me and said, “but where’s your brother bob?”
I explained, “Well, bob should be back very soon as we are going to do our show again in just about 5 minutes time, in fact I need to go the children’s area now so we can get started. You are more than welcome to join us and watch it again if you would like!”
“What do you say buddy, should we go see it?”, asked dad
“YEAH!!” came the exuberant reply as the boy began to hastily re-pack his bag.
Once the bag was packed, and secured, we made our way back to the children’s kingdom area. As we walked, the father and I spoke of a few things, including the family’s newfound desire to attend Bristol, and to do so in costume.
Once we arrived in the Children’s Kingdom father and son found a nice spot on the ground, dad sitting Indian style, with son in his lap and began to wait for the show to begin. I went behind the curtain, and told Andy of the boy, and a quick recap of the gifting. We then walked out front to let the boy give “Bob” his gift as well.
After the show was over and all the other kids left, our little friend came back up to me, and started once again talking. He again told me about his party he had, and how his dad had taken them out on a REAL boat!
Dad stood behind him shaking his head… “He is normally so shy, and quiet, this is just incredible.” I looked up at him, smiled and gave the “this is magic, just accept it” look. The dad understood, without a word.
Then the boy looked me straight in the eye, and mustered every ounce of courage he had and said, “will you come to my birthday party next weekend?”
Once again this little boy nearly turned me into a blubbering idiot. It was the most heartfelt request I have heard in a while.
“I’m so sorry little one, I would love to come, but sadly I cannot. You see my brother and I…”
“You’re going out on your ship aren’t you!!!” he interjected excitedly.
“We are indeed me boy, but don’t you worry, you are going to get to see us again at Bristol.”
When he heard that they would be going to Bristol, and would see us again in a few weeks, he got excited.
“Will it be a very long car ride?” he asked worried.
Dad, still standing behind him shook his head no.
Using the information from his father, I responded, “no, me boy it will not. Don’t you worry, we’ll see each other again!”
Satisfied, and excited he said good bye, and returned to his father, they turned and walked off to enjoy the rest of their day. As they passed through the Children’s Kingdom gates the father turned back for a moment, smiling ear to ear, and said “Thank you, you guys are wonderful!”

A young fan – Part 1

Saturday at the Janesville Renaissance faire Andy (Bob) and I had a little boy approach us after sitting through the show with his mother. He was around 4 years old, and had watched the show with the intensity of a cat who has a mouse cornered and knows he will shortly enjoy a juicy delicious treat.
“Um… can I have the recipe for your stew! I’m having a pirate party tomorrow and I want to make your stew for it!”
I avoided laughing at his request and instead shot the mother a look of joy as she stood back softly giggling at the innate humor of the request. Not missing a moment to play, I knelt down to him and told him that I would look and see if had it written down.
I pulled out my treasure chest from my haversack, and started rummaging through the contents with a little flourish. After a moment, I pulled out a miniature message in a bottle, and explained that while i did not have the pirate stew recipe, I did have a recipe for grog that he could have.
He flashed a huge smile and took his new found treasure from me and then quickly placed it in his jeans pocket to keep it safe. As he reached into his pocket his hand brushed on a small glass bauble he had received from one of the fairy godmothers. Realizing that he too had important treasure, he clasped his fingers around the trinket and withdrew it from his pocket. His eyes glowed with new found excitement.
Holding the bauble protectively in his hand he gingerly presented it to me to examine. As I examined the treasure he proceeded to explain how special it was because it was given to him by the fairy god mothers. No sooner did that thought leave his mouth than a realization that he had other treasure a pirate might like to see entered his mind.
His mother chuckled behind him, “He’s normally so shy!”
He then proceeded to retrieve from his other pocket, some plastic gold coins he had gotten and showed them to me as well. I marveled at the sight of such precious treasure and then told him he should keep them safe. I then re-opened my treasure chest and found a different style of plastic gold coin and gave it to him to add to his collection. He gasped with excitement, “Wow you have real ones!” Apparently a plastic gold coin given by a pirate is far more real than a plastic gold coin given by someone else.
He then thanked me and put away his treasure and returned to his mom to continue their day at the faire.
That alone would have been an incredible interaction itself. It did truly amuse me, and make me very happy of what we have accomplished. However, this is only the first of the story. Read on…

4 years today.

I just can’t believe it’s been four years. I still miss him so much. I still just hurt. It’s hard to explain how it hurts but, I just feel like a part of me was ripped away that day 4 years ago.

We had this unspoken form of communication, where we pretty much always knew what the other was going to say. It just happend , there was no working, no guessing, it was just there. That’s really how the whole friendship was from day one, there was never any work, never any reason to worry you might say the wrong thing. It was just there. Dave was such an incredibly wonderful person and I will miss him every day of my life. My life has been truly blessed to have been able to call him my friend.

I’ll be going to the grave this afternoon after work and will probably stop and see his parents again too.

If I’m crabby today or seem down please forgive me and try not to take it personal. Its not about you…

Great Quote

“To laugh often and much; to win the respect of intelligent people and the affection of children; to earn the appreciation of honest critics and endure the betrayal of false friends; to appreciate beauty; to find the best in others; to leave the world a little better; whether by a healthy child, a garden patch or a redeemed social condition; to know even one life has breathed easier because you have lived. This is to have succeeded!” Ralph Waldo Emerson

Heave Away

Ok, I have checked logs, identified the punk responsible, banned their IP, and banned the IPs of around 30K known spammers. Behold the power of a decent blacklist, sed and awk and a pissed off sysadmin at 3 a.m. Tomorrow when I’m more lucid ill do a little analysis on the block list and trim it down by just banning whole netblocks where I get no traffic but spammers and bots from. For now though I need sleep!

(In case you are wondering? This is a final test message I’m not just blogging for the sake of blogging)

Grrrrr

Well interesting, my log seems to have been hacked. Fortunately not to badly as far as I can tell. I have updated the software to the latest version. (Thank you wordpress for making it painless via SVN and about 30 seconds of work)

I woke up to an email form my server thanking me for setting up my blog… VERY SCARY.

I have also updated wordpress on the other sites I host for safteys sake.