#!/usr/bin/php traveller->current_city->name)); if ('US' != (string)$xml->traveller->current_city->country_code) { $tags .= ' ' . strtolower(preg_replace('/\s+/', '', (string)$xml->traveller->current_city->country)); } $geo['lat'] = (double)$xml->traveller->current_city->latitude; $geo['long'] = (double)$xml->traveller->current_city->longitude; if ((bool)$xml->traveller->travel_today) { $tags .= ' dopplr:trip=' . (string)$xml->traveller->current_trip->id; } } # Email to Flickr if ('email' == $UPLOAD_METHOD) { $subject = implode(' ', $body); if (false === strpos($subject, 'tags:')) { $subject .= ' tags:'; } mail($FLICKRMAIL, "$subject $tags $TAGS", "\r\n--deadbeef-for-dinner\r\n" . "Content-Type: text/plain; " . "charset=\"utf-8\"\r\n" . "Content-Transfer-Encoding: 7bit\r\n\r\n" . "\r\n\r\n--deadbeef-for-dinner\r\n" . "Content-Type: image/jpeg; filename=\"photo.jpg\"\r\n" . "Content-Transfer-Encoding: base64\r\n" . "Content-Disposition: attachment\r\n\r\n" . base64_encode(file_get_contents("/tmp/curvrmail.{$ts}_curve.jpg")) . "\r\n\r\n--deadbeef-for-dinner--\r\n", "From: Nobody \r\n" . "MIME-Version: 1.0\r\n" . "Content-Type: multipart/mixed; " . "boundary=\"deadbeef-for-dinner\"\r\n" . "Content-Transfer-Encoding: 7bit\r\n"); } # Upload using the API else if ('api' == $UPLOAD_METHOD) { # Upload ### # Really geotag ### } ?>