Tuesday, November 2, 2010

Vietnam

Today was my fourth day in Vietnam and my best up to this point by far. Sleep deprivation, jet lag and overall culture shock has made almost all aspects of the trip a bit overwhelming until today. But last nights sleep got us about 12 hours in bed and at least 9 hours of sleep. I was very excited to wake up and have the sun shining.
We arrived in Hanoi Friday night, Oct. 19th after about 20 hours of travel. Our main flight from Seattle to Seoul was a bit over 12 hours and seemed to last days. We made the mistake of not bringing extra food or snacks with us and spent about half of the trip hungry. When we were finally fed, we found Vietnam Air cuisine mediocre at best. Shelby was able to sleep some, but I struggled, and planned to try to stay awake to help me sleep when we finally arrived in Hanoi. We watched multiple movies, played games on our phones, listened to music, walked around every few hours and tried to stretch our legs. Inside the plane, all the windows were closed and everyone tried to sleep, but opening a window would flood the whole cabin with bright light from outside. It was always a shock as you expected darkness outside.
When we finally landed in Seoul, we had plans to buy food for our 2nd leg of the journey to Hanoi, but we had to go through security and by the time we got through, we had to rush to our gate and quickly board our plane. This plane was not nearly as comfy and was a struggle to remain comfortable. Shelby managed to sleep again and I tried but only found myself in a daze of achey sleep and states of frustration. It was a rough 4.5 hour flight.
When we landed in Hanoi, we got through customs, got our stamps on our passports and exited... looking for our hotel driver who was waiting for us. When we finally found him in our confused tired state, he was a welcoming site. He was very friend and drove us calmly to our hotels - 45 minutes away into Hanoi's Old Quarter.
Our hotel was the Time Hotel in Hanoi. It was approaching midnight in Hanoi and everything was shutdown, we wanted food and our friendly host working the desk managed to get us some food and showed us two rooms of our choice. We chose the smaller one as it had a larger bed. We stretched our weary legs, ate our tasty beef and fried noodles, took showers and went to bed... but at this point we were both so overwhelmingly tired that we couldnt sleep. We both took half and Ambien and quickly passed out.
The next morning we awoke very early, took our first daylight look at Vietnam from our windows, got dressed and went to the top floor for our free breakfast. It was a charming layout, there was an enclosed and open section on the top floor that had tables to sit. We were happy to eat our western and vietnamese food in the sun, with great 360 views of the city.
My first thoughts of Hanoi was the architecture. I very much doubt that there are standards and codes here, and if there are, they are either not enforced or not very strict. Buildings are usually small in width, but go up several stories and they are stacked together in tight formations, usually with no space in between them. It seemed to me, that if you lived in Hanoi and owned one of these buildings, if you needed more space, you would simply just build another floor on top of the building. Also many of the buildings had nice little spaces on the roofs/top floors.
When we finally exited our hotel we were thrown immediately into the chaos that is Hanoi. The roads are trecherous. Even the little roads of Hanoi's Old Quarter are extremely intense. For every car there are probably 30 motor bikes. The rule of the road seems to be, do what you want, but dont STOP.... just keep going. I had read about this crazyness, but really nothing prepares you for it until you are walking in the middle of it. It is scary, intense and when mentally capable... often exciting. I found it very enjoyable... that is until I became too tired to deal with it...and during nights, I sometimes found it frightening as sleepyness made the lights all a blur.
This first day we started getting used to the Vietnamese Dong... 1 US Dollar = roughly 19000 VD. It is easier to round it to 20,000... so you keep track of it in your mind, 1 USD = 20k VD, or 5 USD = 100k VD.
Vietnam is cheap! Our first lunch in Hanoi was in an alley. A small space that was probably someones home during the night, turned kitchen during the day. They set out little plastic tables and chairs on the sidewalk/street. We ordered two bowls of Pho, totaly bill, 40,000 VD or $2 USD.
Communication in Vietname has been farely easy. Many people here speak at least some form of broken english. Otherwise a quick game of sherades can usually do the trick. Some of our best cherades so far, sleeping, puking (which we havent done yet), spiders, etc.
Our first day was exploring... walking walking walking. We did manage to get lost and totally turned around at one point, but quickly found that we were only a few blocks from our hotel, even though we were both convinced that we were nearly a mile away. Luckily, this only happened once.
We ended our first full day in Hanoi, eating at an extremely busy streetside spot, where they had probably 30-40 small plastic tables with seats. Seems the their best dish is roasted dove, but we chose chicken and beef instead.
Our second night we managed to fall asleep without phamiceutical assistence, but both of us were wide awake by 1am. We chatted for a while, checked emails, etc, then decided another half ambien was in order.
Jet lag has been a real struggle for us both. Good sleep has been hard to come by. You have moments of excitement and you feel pretty good, then a moment of sitting or relaxation can quickly put you in a state of frustration, agitation and extreme tiredness. We have both had moments of weakness where we could hardly speak. It is a day by day process as we slowly adjust.
Sunday morning we awoke, had our free breakfast on the pleasant terrace, hit the streets. We wanted to take it a bit easier this day and spent a couple hours on a rooftop coffeeshop. It was pleasant. We got our 2nd massage on the trip and got a 1 hour foot massage at a spa, total cost for both of us was around $20 USD.
Sunday night our hotel had got a driver for us to take us to the train station. We had an overnight train sleeper car booked for us to take us north to Lou Cai. Our final destination, Sapa.
The room in the train was small, 2 bunks on each side. We shared it with a nice couple from Austria who gave us extra earplugs... the train can be loud. I had a hard time stretching out in the bunks, but overall it was a comfy ride... though neither of us slept much. We arrived in Lou Cai at 5am. We had arranged a driver for us as apparently this is a location of many scams taking advantage of tired tourists. We had to wait for another train to arrive but finally our 45 minute ride to Sapa began. The views were amazing.
When we finally arrived in Sapa, we checked into our hotel, were shown our room which has an amazing view of the mountains.
I will try to write more tommorrow, as it is getting late, we need dinner and early bed. :)

Wednesday, July 21, 2010

Processing media:thumbnail in RSS feeds with php

Today I am creating a php file that will process various news RSS feeds.

The typical story RSS item looks like this:

<title>Mini-stroke care 'risking lives'</title>
<description>Many patients at high risk of stroke are not getting the specialist treatment they need, an audit finds.</description>
<link>http://www.bbc.co.uk/news/health-10713946</link>
<guid isPermaLink="false">http://www.bbc.co.uk/news/health-10713946</guid>
<pubDate>Wed, 21 Jul 2010 23:20:34 +0000</pubDate>
<media:thumbnail width="66" height="49" url="http://news.bbcimg.co.uk/media/images/48443000/jpg/_48443005_stroke1.jpg"/>
</item>


Problem here is trying to get the url attribute from media:thumbnail.

You can not simply call:
$item->media:thumbnail
or
$item['media:thumbnail']

The solution that I found works best simply loads the xml file as a string, then find and replace 'media:thumbnail' with a correctly formatted 'thumbnail' and lastly convert it back to xml with simplexml_load_string:


$xSource = 'http://feeds.bbci.co.uk/news/rss.xml';
$xsourcefile = file_get_contents( $xSource );

$xsourcefile = str_replace("media:thumbnail","thumbnail",$xsourcefile);
$xml = simplexml_load_string( $xsourcefile );
echo $row['xtitle'] . '<BR>';

foreach ($xml->channel->item as $item) {
echo ':' . $item->title . '<BR>';
echo ':' . $item->thumbnail['url'] . '<BR>';
}


Not nearly as easy as I could find but so far the best solution I could come up with. If anyone finds a better solution, please post it here.

Monday, December 15, 2008

One night in Bangkok



Caught a nice fancy bus to Bangkok (53 baht) today after seeing many sites. I will upload photos soon. Really cool bhuddist wats (temples). Lots of history. Good photos. :)
Turns out rooms are farely expensive here (400 baht with shared bathroom)... or I am just getting cheaper by the moment. We got a room though and its nice enough.
Tonight we are out on the town having drinks. I found a glass of Jamesons and now we have some Singha beers while at an internet cafe. SOOOOO many white foreigners here its crazy.



Hard to tell if I would like this town long term or not. Its sorta crazy.
Also of note, the Thai parliament voted in their new prime minister today. Some demonstrations concentrated near government buildings but overall city is calm. Doubt there will be any trouble but if there is, I have my camera. :)
Tomorrow we will travel around and see some sights and then I will head to the airport tomorrow evening. My trip is coming to an end. :(
Also of note, it snowed in portland today (which is rare).

Sunday, December 14, 2008

Ayutthaya



Yesterday (Sunday) we checked out of our comfy room, called our friend Amy in Portland (Happy birthday Amy!) and caught a motorcycle taxi to the local bus station.
There are many forms one can travel in Thailand besides airplane and train. The top of the tier (and most expensive) are the VIP buses, which are the double decker buses. They come with almost fully reclining seats, air, curtains, tv's and even little personal rooms. I haven't (and probably wont) tried one of these yet but I wanted to. After that you have the minivans, which include very tight seats and insanely fast driving. After that you have the local bus, which is dirt cheap but slow. Usually there are fans mounted on the ceiling and the bus sounds like it could fall apart any second. Also there are many stops along the way and you get to get comfy with the locals. Even cheaper then that are the open air trucks, which is basically a truck with seats and cover in the back. Taxis, motorcycle taxis and rickshaws.
We took the local bus and started off towards Ayutthaya. Unfortunately a bus doesn't run direct so we had to take a bus to another town first, then catch the bus to Ayutthaya from there. Mileage wise, this shouldn't have taken too long. But it did. It took about 5 hours. In all it cost us about 100 baht each.
When we finally arrived Ayutthaya we were both grumpy and tired from our loud bouncy smoky (from exhaust) ride. We hiked over to a guest house that was recommended in my Thai book, ate, had a couple beers and crashed hard. The guest house (Toni's) is decently comfy in the common areas, but the room leaves much to be desired and is relatively not cheap (500 baht).
Ayutthaya was the capitol of Thailand (Siam) for roughly 400 years with almost 60 kings ruling from here. There are temples and wats here that are over 500 years old. So lots of history to see. So today we plan to do a hike through the city and check out some of the sights. Then we are thinking of heading into Bangkok to check out the city for the last couple nights.
One thing to consider... Thailand's parliament is voting for a new prime minister right this minute. The Thai's here all watching. I was speaking with an Indian born Thai who says this could lead to more troubles. Hopefully there wont be many issues.

Saturday, December 13, 2008

Born to Ride


Rented the motor bike Saturday morning from an Irish bar. We had stopped by the bar Friday night because I was in a frantic search for some Jameson's whiskey and that was my last resort. No luck. But the Irish expat owner gave us his best bottle of whiskey and we sat and had a few drinks. He married a Thai women and can now retire here and has started a bar. He rented us the motor bike for 200 baht. Needless to say, I looked cool on it. An easy rider for sure! :)
So Saturday morning we got up, moved to a nicer guesthouse (the room and view from room below) down the road a bit (450 baht with TV and a real nice bathroom with HOT WATER!) and picked up our motorbike.




So to be honest, I am of the age where I definitely do NOT feel immortal. As a matter of fact I am quite aware of my mortality! In my 2.5 weeks here in Thailand I have seen some crazy driving, been in a bus that ran over a motorcycle and seen the general chaos of the roads. So I realized that this might be a bit crazy. But it sounded like fun... but it doesn't mean that I wasn't a bit nervous about the idea. Not to mention I have not driven a motor bike in say 20 years. So, upon picking up this sporty bike I sat on it and drove off, the whole time saying to myself 'stay on the left side... stay on the left side'... I was a bit shaky in my driving.





We got some gas and off we went. We were driving to Erawan waterfall, some 65 kilometers north of us. Immediately we hit a big road with lots of traffic. I just stayed 'on the left side' and tried to find another person on a motorbike and follow them and their speed.
Eventually we got out of the city and the beautiful country where cows graze openly along side the road, stray dogs run randomly into the road and elephant crossing signs are common (though we saw none). We stopped about 40 km into the ride and rested for a bit. Once back on the road we were passed by a series of three double-decker (two story) buses. This was the scariest part of the trip. I could see them coming up behind us and would have pulled over if I had the chance. They were moving fast and each one passed by us quickly (about what seemed at arms length away) and the wind from it sort of blew us all over the place. This was scary enough in itself except that I knew another bus was right behind us coming up quick. Luckily, my awesome 'hells angel' like driving skills got us through this brush with death! But no doubt, it scared the shit out of me! :)

I breathed a HUGE sigh of relief when we arrived at Erawan. We had heard about it in town. A series of waterfalls and pools. We were told there were large fish in each pool that would eat from your hand and nibble at your legs. It was stunning. Unlike anything I had seen before. The water was a clear whitish blue.










We climbed up to the 5th pool (which we had heard was the best) and swam there. The fish would peck and bite at your legs if you stayed still ... which would always make you jump in surprise. After swimming for an hour we slowly made our way down and back to the motor bike... always conscious that we did NOT want to be driving in the dark.

We jumped on our bike and started heading back. About 30km into the drive we stopped for a break. While there we witnessed another aggressive dog fight. Seems they are common here. Soon enough we started off again. After a few minutes of speedy travel, we ran out of gas!

One would think a motor bike would easily make 65km and back. Not the case with this motor bike. We were literally in the middle of nowhere. Sad thing is, there was gas at the last stop, now some 4 kms back. By chance there was a large truck with several men just waiting on the side of the road some 50 yards in front of us. We walked up to them and told them 'no petrol'... they laughed and spoke to us in Thai. They knew no English. A few of them walked up and looked at our bike and seemed amused. They tried to tell us things and eventually we figured they had made a call on their mobile and wanted us to push the motor bike up to their truck. One of them came up to us and showed us two VERY LARGE tarantulas in his hand. I think they were dead. He motioned for us to try and eat one of the legs. We declined. They all got a good laugh as we both shuttered. But they did get us to touch their harry bodies. These things were HUGE... the body made of two large round parts about the size of a large marble. Another showed us how they were catching them. Apparently they live in holes in the ground and they take sticks and push them down the holes and twist them around...eventually bringing up one. I guess they eat them!

After a few minutes another guy showed up on a motorbike and drove Avery off for petrol. 10 minutes later she was back and we filled put some in our tank. Before we could get away a truck pulled up with lots of petrol... not for us, but for the truck. Seems the guys in the truck had also run out of petrol. We all got a good laugh out of this one. The whole experience once again proved my like for the thai people. Everyone was very friendly.

We drove the rest of the way without incident. Last night we got a couple beers and went to a night market. Both of us were too beat to stay out too late though.

Today we plan to take a local bus to ... hmm, i forgot the name of the city. Its about an hour north of Bangkok. Its the historical capitol of Thailand and is full of ruins inside the city. From what I read, Elephants are a common means of travel inside the city. Sounds interesting. We plan to stay two night there, then I plan to take a bus to the Bangkok airport for my flight. My trip is almost done!

Thursday, December 11, 2008

Kanchanaburi and the River Kwai


Caught the train last night in Surat Thani at about 7pm.
We had a top and bottom bunk that fold up into seats. People immediately around us started crashing in their bunks but me and Avery were up chatting till about 10pm. We broke down the beds and I crashed on the top bunk. It was comfy but the train was loud and jarring and often stopping. Avery woke me up at about 6:30am as we crawled into Bangkok. It was hard for me to wake up. We grabbed our stuff and exited the train. We checked for tickets north to Kanchanaburi but none left from that station. So we decided to take a city bus to the main bus station and catch a bus to Kanchanaburi.
We walked a bit and waited at a bus stop for 30 minutes before the 807 bus picked us up (15 baht). Got to the bus station and bought two tickets for 83 baht each. CHEAP!
Our bus head out almost immediately. It was a large old bus that bounced and banged with each bump. Avery and I both fell asleep... only to be awakened by screams. The bus was jarring back and forth and was traveling over the raised median of the road. It almost seemed the bus could tip over and I could feel things going under the bus. I was just grabbing hold of my seat as everyone looked to the sides as something went past. Clearly our bus had hit something and ran over it. We came to a stop and everyone was in shock.
I could see a motorcycle torn up on the ground underneath the bus.
Avery said she saw a guy rolling on her side of the bus.
Turns out a guy on a motorbike lost control and crashed right in front of our giant speeding bus. The driver swerved onto the center median (elevated with grass and plants) to avoid running over the tumbling man. His bike was not so lucky and went under our bus.



The man was very lucky. Though he had to be taken away in an ambulance (or something like it) he was ok and could walk.
We had to wait around for 30 minutes until a new bus could take us. That was our excitement for the day.

OMG, I just now witnessed the worst dog fight I have ever seen. One dog was attacking the other outside the internet cafe here and was biting and tearing at the others face as it screamed. Nobody was doing anything. I considered trying to break them apart but i am in sandals. Finally two people came up and after several very hard kicks and hits with a board, the attacking dog finally broke off screaming for minutes. Being a dog lover, I found the whole thing EXTREMELY unsettling. I miss Kutya. Dogs and cats in Thailand suffer.

ANYHOW... we arrived in Kanchanaburi and are taking it easy today. We have rented a motor bike (200 baht for 24 hours) for tomorrow and plan to head to an amazing waterfall swimming area in the morning. We will be driving over the Bridge over river Kwai. Might also head to a hot springs. Should be fun. We booked a nice room over the water for 450 baht (shown below). Its comfy and has a great shower with hot water but the walls are paper thin and people are loud. Things are cheaper here.



Im going to take a shower and I think me and Avery are going to go get a massage. My first on the trip. 150 baht for one hour. Not bad.

Saturday UPDATE: Got the massage. It was great. Think I will get another before we leave this town. Also had a big reminder last night that you need to always pay attention while walking in Thailand. Sidewalks will have random holes or steps or whatever. I was getting up from my chair last night after a tasty fire cooked pizza (my 2nd on the trip) and did not see a random 1ft tall concrete wall that has no reason to exist except to trip people like me. I tripped and cut my elbow and ankle. Smooth. Avery found it rather amusing. :) It is pretty clear that Thailand does not waste much time worrying about liability lawsuits and such. Best not to get injured here I guess. There are more Americans here then any other place I have been. Ive met probably 10 in the past 24 hours. Before that, I had met none (besides on my plane).

Saturday Night UPDATE: Back from long ride to the waterfall. Made it safely but internet is shutting down. Will post tomorrow.

Surat Thani

Yesterday I was shocked/electrocuted 3 times! Twice on the computer that I posted yesterdays blog post on and then in the bungalow during the night (while I was trying to turn on the light). So, today I have avoided all powerlines and such. :)
Up early this morning. Monkeys came to our bungalow this morning and welcomed us into the day by stealing a bag of goodies from our room (crackers and pineapple juice). Avery booked us a mini-van ride from the Park to Surat Thani, a city 2 hours east of the Park. We were picked up at our resort and all of a sudden it was stage 3 of DeathRace 2008... but this guy was a bit more subdued in his crazy driving.
We arrived Surat Thani and had them drop us off at the train station, where we dropped off our bags and booked a train ticket to Bangkok for this evening... we got sleeper cars for about 700 baht each (all they had left were air conditioned sleepers, which we dont need). Fan sleepers were sold out. :(
We then took a bus to downtown Surat Thani to look for some food and see some sights. Turns out there are very little western restaurants and we seriously walked for 4 hours before we found a place that we felt would be OK to eat at. We had some beers and ate 4 main dishes between the two of us. It was a fun walk though. We got lost in various neighborhoods and kept running into very nice Thai people who tried to help get us back on track.
We just caught the bus back to the train station (15 baht) and our train leaves in 1 hour. Checking internet, plan to buy some snacks and whiskey and then off to our train.
Everything is VERY cheap in this town. Avery bought a shirt for 60 baht. We only saw 3 other foreigners in the 5 hours we were walking. It was nice to be away from the touristy stuff... and the tourists.
But, on the other hand, we could have used some 'western' restaurants. We saw plenty of places to eat, but they all had precooked dishes sitting in bowl and plates with flies around them and whatnot. Neither of us want a serious case of food poisoning and were too paranoid to dig in at those places.
Our plan now is to take the overnight train to Bangkok. We will arrive there around 7am. Then we will book another train to Kanchanaburi in western-central Thailand. Its on the River Kwai and is where 'Bridge over the River Kwai' is based. I have seen the movie. 18000 POWs and 90,000 asians apparently died building the bridge under japanese occupation during WW2. Its supposed to be a charming town and both Avery and I are excited to get there. So I will see Bangkok tomorrow morning from the train station only.
Excited to be on the train. Hope it lives up to my expectations. If not, i have whiskey! :)
Only 5 more days of my trip left!!!!!!
We better go if we want to catch our train.