Skip to content

Lukas Arts – Web Designer & Photographer, Cheshire UK

Passionate designer & photographer
Jul 18 10

Air Tattoo 2010

by Lukas

Just got back from Air Tattoo, Fairford 2010. Utter heavy traffic not only on A417 but also in the air ;) What an amazing display! Just a few shots from saturday and I’m off to bed!




Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
-->

Just got back from Air Tattoo, Fairford 2010. Utter heavy traffic not only on A417 but also in the air ;) What an amazing display! Just a few shots from saturday and I’m off to bed!

Mar 30 10

Isle of Skye

by Lukas

Isle of Skye is one of the most beautiful place I’ve ever been. I’ve spent there a couple of days this January and let’s face it – this island is gorgeous. Just a few pics from my 3 days trip.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
-->

Isle of Skye is one of the most beautiful place I’ve ever been. I’ve spent there a couple of days this January and let’s face it – this island is gorgeous. Just a few pics from my 3 days trip.

Mar 18 10

php mail() multiple attachments solution

by Lukas

If you need a solution for multiple attachments in PHP using mail() function take a look below. Code below allows to attach and send 2 files. If you still having problems just take a look at raw email file. Each attachment needs to be divided by mime boundary (same boundary for each file) and this boundary needs to be added at the end of our message.

$logo = $_FILES['logo']['tmp_name'];
$logo_type = $_FILES['logo']['type'];
$logo_name = $_FILES['logo']['name'];
$image      = $_FILES['image']['tmp_name'];
$image_type = $_FILES['image']['type'];
$image_name = $_FILES['image']['name'];

headers = "From: no-reply@mydomainhere.co.uk";
if (is_uploaded_file($logo)) {
$file = fopen($logo,'rb');
$data = fread($file,filesize($logo));
fclose($file);

// Generate a boundary string
$semi_rand = md5(time());
$mime_boundary = "{$semi_rand}";
$rand_id = md5($semi_rand);

// Add the headers for a file attachment
$headers .= "nMIME-Version: 1.0n" .
"Content-Type: multipart/mixed;n" .
" boundary="{$mime_boundary}"";

// Add a multipart boundary above the plain message
$message = "--{$mime_boundary}n" .
"Content-Type: text/plain; charset="iso-8859-1"n" .
"Content-Transfer-Encoding: 7bitnn" .
"Name : $_POST[name] nn" .
"Address : $_POST[address] nn" .
"Description: $_POST[description] nn";

// Base64 encode the file data
$data = chunk_split(base64_encode($data));

// Add file attachment to the message
$message .= "--{$mime_boundary}n" .
"Content-Type: {$logo_type}; name="{$logo_name}"n" .
"Content-Disposition: attachment; filename="{$logo_name}"n" .
"Content-Transfer-Encoding: base64n" .
"X-Attachment-Id: file_{$rand_id}nn" .
$data . "nn";
}

// Second attachment
if (is_uploaded_file($image)) {
// Read the file to be attached ('rb' = read binary)
$file = fopen($image,'rb');
$data = fread($file,filesize($image));
fclose($file);

// Base64 encode the file data
$data = chunk_split(base64_encode($data));

// Add file attachment to the message
$message .= "--{$mime_boundary}n" .
"Content-Type: {$image_type}; name="{$image_name}"n" .
"Content-Disposition: attachment; filename="{$image_name}"n" .
"Content-Transfer-Encoding: base64n" .
"X-Attachment-Id: file_{$rand_id}nn" .
$data . "nn" .
"--{$mime_boundary}--n";
}

// Send the message
$ok = @mail("confirmations@whatever.com", $subject, $message, $headers);
if ($ok) {
echo "OK!";
} else {
echo "Error!!";
}
}
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
-->

If you need a solution for multiple attachments in PHP using mail() function take a look below. Code below allows to attach and send 2 files. If you still having problems just take a look at raw email file. Each attachment needs to be divided by mime boundary (same boundary for each file) and this boundary needs to be added at the end of our message.

Mar 17 10

Focus on Imaging 2010

by Lukas

Focus on Imaging 2010 (NEC Arena, Birmingham, UK) snapshots ;)

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
-->

Focus on imaging 2010 (NEC Areba, Birmingham, UK) snapshots ;)

Mar 17 10

Yongnuo CTR-301P

by Lukas

Finally got my wireless flash trigger Yongnuo CTR-301P and 3 receivers y’day. I decided to get cheaper version of pocket wizards. PW don’t work too good with Nikon body and event if they will they are way too expensive (for what?, huge range?). PW offers transmitter & receiver, buying Yongnuo CTR-301P get transmitter and 3 receivers for 75% cheaper!

Flash guns can be triggered using wireless signal or photocell. I took ~100 pictures without miss fire. Big plus for Yongnuo CTR-301P!

CTR-301P Transmitter fits camera body perfectly and it’s powered by it because it’s completely sealed, no battery comes with it.

Channel change in Yongnuo CTR-301P can be done by the smallest pair of switches possible so if anyone wants to use multiple studio set-ups on day to day basis I won’t recommend CTR-301P version unless you’ve got small fingers.

As you can see Yongnuo CTR-301P trigger can release multiple flashguns and different manufacturers flashes work fine together. Canon 430 EX II and Nikon Speedlight SB-900 triggered by Yongnuo CTR-301P without a problem.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
-->

Finally got my wireless flash trigger and 3 receivers y’day. I decided to get cheaper version of pocket wizards. PW don’t work too good with Nikon cameras and event if they will they are way too expensive (for what?, huge range?). PW offers transmitter & receiver, buying CTR-301P get transmitter and 3 receivers for 75% cheaper!