Sunny Lomo-Friday
Lovely afternoon in North London, feels kinda like spring.. almost. Thought I’d try out the amazing Lomo iPhone app, QuadCamera on some bleaching sunlight. Not bad for 3 seconds clicking.

A blog about some things I know and love. I.e. Design, Technology, Music and Art
Lovely afternoon in North London, feels kinda like spring.. almost. Thought I’d try out the amazing Lomo iPhone app, QuadCamera on some bleaching sunlight. Not bad for 3 seconds clicking.

I ran into numerous problems on a recent Flash build. Mainly as I was compiling via the FlexSDK on the command line and testing in an open browser. Not ideal, and I really hit some problems when cross-domain restrictions came to play.
Lucky for me Mr Apache and his best friend PHP came out to play, and I wrote a snippy little proxy class to request the files through. Bypassing the need for a cross-domain as all the files we’re being hosted on the localhost. Beauuutiful.
So in true Open Source style, here’s the proxy class in all it’s glory. A couple of things:
The source code is below, otherwise download this ZIP: Proxy.php
requestURL = $queryVars[ self::$QUERY_URL ];
$this->headers = isset($queryVars[ self::$QUERY_HEADER ]);
if(isset($queryVars[ self::$QUERY_MIMETYPE ]))
{
$this->mimeType = $queryVars[ self::$QUERY_MIMETYPE ];
}
if( $this->startCurlSession() )
{
if ($requestType == self::$REQUEST_TYPE_POST) {
$this->makePostRequest();
}
if($repsonse = $this->makeRequest())
{
if ($this->mimeType)
{
header("Content-Type: " . $this->mimeType);
}
echo($repsonse);
}
$this->stopCurlSession();
}
}
}
/**
* Initiates CURL session into current object
*
* @param void
* @return void
*/
private function startCurlSession ()
{
if($this->curlSession = curl_init($this->requestURL))
{
return(true);
}
return(false);
}
/**
* Closes current CURL session
*
* @param void
* @return void
*/
private function stopCurlSession ()
{
if(curl_close($this->curlSession))
{
return(true);
}
return(false);
}
/**
* Generates and commits CURL command to external server
*
* @param void
* @return string
*/
private function makeRequest ()
{
curl_setopt($this->curlSession, CURLOPT_HEADER, ($this->headers) ? true : false);
curl_setopt($this->curlSession, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($this->curlSession, CURLOPT_RETURNTRANSFER, true);
return(curl_exec($this->curlSession));
}
/**
* Creates POST headers (if needed)
*
* @param void
* @return void
*/
private function makePostRequest ()
{
$post_vars = Array();
$ignore = Array( self::$QUERY_URL, self::$QUERY_MIMETYPE, self::$QUERY_HEADER);
foreach($_POST as $key => $value) {
if(!in_array($key, $ignore))
{
$post_vars[] = $key . '=' . $value;
}
}
curl_setopt ($this->curlSession, CURLOPT_POST, true);
curl_setopt ($this->curlSession, CURLOPT_POSTFIELDS, implode("&", $post_vars));
}
}
// Instantiate
$cdpr = new CrossDomainProxyRequest( CrossDomainProxyRequest::$REQUEST_TYPE_GET );
?>
There’s been alot of press lately regarding the new found viability of Flash and search indexing. Whether the improvements in the Flash player quantify to leaps in plug-in SEO or nothing more than than a puff in the wind.
In my opinion there’s little change in Flash SEO capabilities. Google have been indexing Flash files for sometime, and there’s been little formal evidence to suggest that a SWF can alter your search result position in anyway.
During a recent in-house project we came across this very issue and attempted to create our own style of Flash indexing for the site. After recent review it appears to be working brilliantly and has sucessfully managed to promote the indexing of textual content for each Flash page uniquely within Google search results.
The technical solution was a combination of Apache mod_rewrite, PHP (SimpleXML), SWFAddress (for SWFObject) and some bespoke JavaScript holding it all together. With the Flash site popualted via an XML document and utilizing SWFAddress to create a historical (back button) record of pages visited within the SWF. It was a case of converting the internal SWFAddress URIs (that use a standard hash technique that all AJAX based apps use) to a standard URL and preventing 404’s by mod_rewrite. Then once a URI is registered on the server, it serves up the index HTML with a parsed text-only version of the content, promoting indexing for search bots, and converting a standard URI to a hashed version via JavaScript (in the case that JS was activated and Flash was installed).
Whilst this approach may seem longwinded, it allowed us to generate an accessible, indexable site that offered the correct content delivery for relevant client platform (HTML or Flash). Improving the search ratings of the site and promoting deeplinked Flash pages.
Start Creative currently operates this system on their agency portfolio site, and I for one, am pretty proud of the achievement. Examples of the indexable links:
http://www.startcreative.co.uk/adidas/hub/, http://www.startcreative.co.uk/bbc/case_02_dsdWebsite/
So yesterday I attended the Adobe onAIR tour at The Brewery in London’s east-end. And what a pleasant surprise it was as well. After being a little disappointed with the Colin Moock session a few weeks ago I wasn’t sure what to expect but the AIR team definitely turned up to impress.
Daniel Dura and Kevin Hoyt both made really interesting presentations about the flexibility of the AIR development environment and underlying interface. Particularly ion regards to integrating HTML and Javascript.
Dion Alamer from Ajaxian.com made a a great talk about Google gears and the 3rd party technologies you’ll be able to utilize within AIR. Pointing out the fact that this technology embraces the existing, rather than developers having to recreate the wheel.
Lee Brimelow finished off the show with some great mini applications demoing some key features of the app and supplying us all with a much needed laugh at the end of a long day.
Looking at the technology it’s definetely got some serious legs. At the very least the opportunity for web developers to create native applications without having to worry about learning the formalities of standard application development is great. The main sell of AIR has to be around the integrated web/desktop features. At initial review, the ability to drag-and-drop web data from your browser is brilliant but the possibilities that this opens up is just unimaginable. In a digital world where Google is taking over with online applications and slowly trying to bring your desktop to the web. An application that brings the web into your desktop and vice-versa is not necessarily in competition, but quite simply the personification of Marshall McLuhans “Global Village”.
I for one can’t wait to get my teeth stuck into developing some AIR applications.
Recent comments
People I follow
Personal projects