I’ve been without easy access to a computer in ~48 hours, so this is my first real opportunity to write what’s going on.

After an insanely windy night, the fire hit Rancho Bernardo (where the office is located, 15 minutes south of our apartment) early Monday morning. People grabbed servers and backups to get them out of the way of the mess and a lot of communication over the internal company mailing list kept people informed on where everyone was.

At 9:30am, we decided that the air was getting dangerous for Alanna, so we hopped in the car and headed toward a coworker’s place on the beach. Unfortunately, the road we normally take to get out that way was barricaded off. So, we turned around and landed at m3mnoch’s place in stead.

Later on that day, the city of Escondido declared a mandatory evacuation of our neighborhood anyway.

We spent the entire day watching the news, calling people, and sending email from my cell. (Yes, I realize I could probably have used one of m3mnoch’s computers, but we didn’t want to make any more of a nuisance of ourselves. And yes, I realize that we probably weren’t that much of a pain. Just a moderate variety pain. Sort of a 6 out of 10.) The fire continued to chew through town in a WSW sort of direction.

Tuesday was more watching the news. Fallbrook caught fire to the north and the I-15 toggled between open and closed along its entire length. Lake Hodges (~4 miles from of our apartment) caught on fire. I explored San Marcos and Vista to check out the smoke levels. It was pretty bad. Half of the shops in town were open, however, and there were people on the streets. I bought a clean pair of PJ’s for the baby before heading back inside.

Around 3pm, we finally realized that the city wasn’t very likely to let us back into our apartment that night, so we checked that the 15 was open northbound and decided that it was time to visit Penny’s brother up in Las Vegas.

So, after a bit of hassle trying to find a gas station that hadn’t been sucked dry, we tanked up the car, grabbed some chicken nuggets, and left the county.

The Fallbrook area was bad. Both sides of the 15 were scorched for a few miles. We saw a chopper fighting active flames.

Around Corona/Ontario, we encountered evidence of some of the fires further north and the wind was insane. We saw three semi trucks that had blown over, including one enormous Walmart trailer.

Otherwise, the trip to Vegas was pretty uneventful.

Meanwhile, it looks like most of my coworkers are OK. There seems to be a little doubt about one of their apartments, but pretty much everyone else’s places are confirmed as just fine. The servers were handed off to Sean and might be finding themselves plugged into a network today so I can get some work done.

We don’t know about the ward, so we’ll probably find out about them this weekend. It looks like our chapel is being used as an evacuation center – which is promising, since the chapel’s between our apartment and to Lake Hodges. Chances of actual fire damage to our neighborhood seem to be nil.

I’d like to be back home, but even if the mandatory evac has been lifted from our area (which question I am currently incapable of finding an answer to online), we don’t want to go back to Escondido for Alanna’s sake. Our A/C is borked and the county web site says that the air quality index in Escondido is currently off the charts in the hazardous direction. We’re not taking a baby into that.

We’ve got a small bit of video recorded of the smoke and the one fire in Fallbrook that I’ll probably be posting whenever I get a chance to edit/encode it together.

Right now though… we’re going to go buy some clean clothes. We didn’t expect to be displaced for quite so long so didn’t grab much in the way of supplies for ourselves (Alanna’s well stocked, though :P )

Yes, I know you can do this via cURL. This was explicitly written for a case when that particular luxury was not available to me.

So… it’s been a while since I’ve written a post, and I’m feeling the withdrawals. I’ve got 16 half-written posts waiting in the queue and two more that I want to write but haven’t even started. It’s also time for another round of anime reviews; I’ve got two video games I want to review…

And I am having to play the “too busy with RL” card.

In stead, I present a function that I wrote this morning. It’s been done countless times before, and you can probably find incredibly similar code out there already, but it’s the first time I’ve ever actually needed something quite like this.

/**
 * Send post data somewhere ;)
 *
 * @param $host The domain name of the host to send the data to.
 * @param $path The path of the script to receive the post.
 * @param $data An array of key/value pairs to send.
 * @return       The HTTP response, headers and all.
 */
function http_post( $host, $path, $data ) {
	// build a query string from the data array
	$arr = array();
	foreach( $data as $key => $val )
		array_push( $arr, "$key=".urlencode($val) );
	$data = implode( "&", $arr );
	// send that post
	$fh = fsockopen( $host, 80 );
	fwrite( $fh, "POST $path HTTP/1.1\\\r\\\n" );
	fwrite( $fh, "Host: $host\\\r\\\n" );
	fwrite( $fh, "Content-type: application/x-www-form-urlencoded\\\r\\\n" );
	fwrite( $fh, "Content-length: ".strlen($data)."\\\r\\\n" );
	fwrite( $fh, "Connection: close\\\r\\\n\\\r\\\n" );
	fwrite( $fh, $data );
	// get the response
	while( !feof($fh) )
		$buf .= fgets( $fh );
	fclose( $fh );
	return $buf;
}// end: http_post

This method could easily be modified to send GET data or to talk over a different port. It could also probably actually do something with the response buffer (check for 200, etc…). It could be a bit more fault tolerant, etc… but that’s not what I need for the application at hand.

For other examples of how people have done similar/related things, take a look at the comments on the fsockopen() documentation page.