XML. Your friend, your enemy. Perhaps it’s overused, but do enough work with a few 3rd party systems and you’d better have a solution for throwing XML into an array.There is a potential misuse of fopen() to call external XML’s and many hosted service providers will forbid you from using it to call external files. Therefore, I humbly suggest using CURL to do your dirty work. It’s a few extra lines of code, but it’s worth it.
//the location of your external XML file. Basic HTTP Auth can be added if necessary
$url = “https://someurl.com/somefile.xml”; //grab the XML and save it to a temp XML file
$ch = curl_init($url);
$fp = fopen(“temp.xml”, “w”);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
fclose($fp);//Load the local XML that was created in the above CURL call
$xml = simplexml_load_file(“temp.xml”)
or Die (‘ERROR: Could not load file’);print_r($xml);
Sometimes, people just don’t know when to shut up…especially on Twitter. So, Slap them. No no. TWITslap them!https://www.twitslap.com
Only took me an hour or so. Needs some new features and a new design, but it works. I’ll shine it up a bit in the coming weeks.
Recently I've been working on a custom web app that integrates with phpbb3. In this app, I'd like to have a custom user profile page. I have my own 'users' table and the link between the two is the "user_id" field which I set when the user first enters the app. Throughout, however, there are "Submitted By:" sections with links to the user's profile page.On said profile page, I'd like to show the user's avatar straight from phpbb. This took some hackery, but I finally got it working. Behold.First off, if you're not already doing phpbb session management, here's that code. This requires your phpbb user to be logged in:define('IN_PHPBB', true);//replace $phpbb_root_path with path to your forum<
Poor Kid. I knew you could get stuck in those things, but I figured only an arm…not your whole…person.
After an announcement pre-Christmas about signing with Transpera to do a mobile WAP site, it seems it’s finally launched! All Revision3 shows are now on mobile — https://m.revision3.comDigg:
https://digg.com/tech_news/Revision3_launches_mobile_website_http_m_revision3_com
i’m making some iPhone WAP designs and needed to see how they’d look without actually buying an iPhone (another one, that is). i’m using the user agent of the iPhone to switch the layout designs.there’s iPhoney for the Mac, but i got moved to a PC recently, so it’s a little trickier. there’s iPhonetester.com, but it passes my firefox user agent and the site won’t switch. so here’s the workaround:
hydroplane. v.
To be or go out of control by skimming along the surface of a wet road. Used of a motor vehicle.
so after a nice day of climbing in joshua tree with sensei, golfer, jill, and jcpeace (josh), everyone went their separate ways. freezing and hungry, i went back to my campsite. as i sat by my tent, trying to get a fire started with wet wood and sipping my cup o’ noodles, i thought, “maybe i should just go home. i had a day climbing, it’s probably gonna rain Sunday. i’d like to sleep in a real bed.”
“no! this is your last climbing trip before the baby comes! plus, you already paid for the campsite. suck it up and climb!”
around 10pm the winds started. my tent was on a bed of rock, so i neglected to spike it down. the rocks on the corners didn’t help, and around 11pm, my tent collapsed.i struggled to get out of my sleeping bag and put on my jacket. i piled all my belongings into the back of my tiny car, laid down the seat, and contorted my body enough to lay down and sleep. the car rocked back and forth in the wind for the rest of the night.
at 7am, i woke up. the wind was still howling and the clouds were rolling in from the west. i sat in the back of my car trying to think of a sheltered place to climb. i drove out to Hall of Horrors, walked around, and decided to call it a day. i left the park, experienced the worst ever customer service at the Denny’s in Yucca Valley, and started down towards the 10.
The rain was pouring, and I could barely see 50 yards ahead. I was doing fine, trying to stay focused on the dashed white lines flying by. 10-west, just before california st. in Redlands, i hydroplaned. i did about two 360’s, bounced off the center divide, did two more 360’s and slammed head-first into the center divide. my car was totaled, i was shaking uncontrollably, and somehow my Joshua Tree park pass had jumped from my center console to the side pocket of the drivers side door (amazing physics).
no car rental places are open in this great city of Redlands. so now i’m sitting in the lobby of a Howard Johnson below the freeway, waiting for my father in law to drive up from San Diego and pick me up. he’ll drive me to SD where my wife is this weekend, then we’ll make the 2 hour drive back to LA tonight.
sucks.
lesson learned: if you already had a great day of bouldering, and the next day it will probably rain, and you’re alone, hungry, and only 2 hours from a warm bed and hot food…go, man. just go.
signing off from the HoJo,
jon
PLEASE NOTE THAT THIS ARTICLE WAS FIRST PUBLISHED IN JANUARY 2008. I NO LONGER OWN THE SONY P1i AND CANNOT GUARANTEE THAT THESE INSTRUCTIONS ARE UP TO DATE.
while cruising from the SFO airport to our SF office in the financial district, my EVDO card had a freak out. i was right in the middle of sending an important email, so i decided to see what my wifi card would bring me.
i remember some article back in the day about possible city-wide wifi in San Fran — I guess that never happened. However, what was incredible was the amount of wireless networks filling up my list as I drove through the city. I’m sure there are places in downtown with a higher concentration, but this was by far the most i’d ever seen in my list:
Writer. Musician. Adventurer. Nerd.
Purveyor of GIFs and dad jokes.