My name is Edward Tanguay. I'm an American software and web developer living and working in Berlin, Germany.
2 days ago: Blogged: "The Base of Future Language-Learning Platforms: Free, Online, Dual-Language Situational Videos": http://t.co/6z8JLw8u #efl #tesl.
2 days ago: "how do you discipline your kids? / you mean how do I educate my kids?" good ideas on parenting: http://t.co/pJCYCxVL.
2 days ago: "in stand-up meetings, even employees telecommuting on Skype are not excepted" nice trend: http://t.co/dB6xcFO0.
4 days ago: 30K icy sunday #berlin winter run across großziethen crossing, 64 pics, 1 video, 69 days to #parismarathon: http://t.co/pRWmrVui.
4 days ago: FANTASTIC superbowl! right down to the last second, worth staying up for, good night, und feier schön New York.
4 days ago: German superbowl commentator is explaining what a "hail mary" is.
4 days ago: German superbowl commentator: "I was hoping for someone younger, but Madonna generally puts on a good show".
4 days ago: If 111 million people are watching this game, so am I, up at 12:30 AM, #sat1 german commentators, love it, GO PATRIOTS! http://t.co/0Nf5Zlua.
6 days ago: Flight and hotel booked for #parismarathon, cheap and easy in 10 minutes, nice website experience: http://t.co/XAPst04m.
6 days ago: Intouchables, awesome movie, 2 guys who should have never met: black/white, rich/poor, love life #french #movies http://t.co/8BLBep9a.
on Thursday, February 02, 2012: Things accomplished today: stood before the sistine madonna and sleeping venus #dresden #gemäldegalerie.
WPF CODE EXAMPLE created on Sunday, March 21, 2010 permalink
How to consume text from any Google Document, RSS feed, or Twitter feed in your Silverlight application
If you try to read data via WebClient into a Silverlight application, you will get a security error unless the site from which you are reading text has a clientaccesspolicy.xml file which allows you to read the text. This seriously limits the kinds of data Silverlight application can access on the web: no public RSS feeds, no Twitter feeds, etc. So I wrote this proxy script and put it up on my PHP site, and now can get text into Silverlight from any site on the Internet via this proxy by passing the url I want to access as a parameter like this: http://www.mysite.com/getwebdata.php?url=http://docs.google.com/Doc?id=dc7gj86r_1sdc4trnd2. This allows you to create Silverlight applications whose content can be controlled by non-technical administrators simply tweeting or updating a Google Docs document, etc.
<?php
$url = filter_input(INPUT_GET, 'url',FILTER_SANITIZE_STRING);

$validUrls[] = "http://docs.google.com";
$validUrls[] = "http://twitter.com/statuses/user_timeline";

if(beginsWithOneOfThese($url, $validUrls)) {
    $user_agent = 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_COOKIEJAR, "/tmp/cookie");
    curl_setopt($ch, CURLOPT_COOKIEFILE, "/tmp/cookie");
    curl_setopt($ch, CURLOPT_URL, $url );
    curl_setopt($ch, CURLOPT_FAILONERROR, 1);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch, CURLOPT_TIMEOUT, 15);
    curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
    curl_setopt($ch, CURLOPT_VERBOSE, 0);
    echo curl_exec($ch);
} else
    echo "invalid url";

function beginsWithOneOfThese($main, $prefixes) {
    foreach($prefixes as $prefix) {
    if(beginsWith($main, $prefix))
        return true;
    }
    return false;
}

function beginsWith($main, $prefix) {
    return strpos($main, $prefix) === 0;
}
?>
need markup?