Monday, September 25, 2006

Ajax...

"Ajax is not a technology in itself, but a term that refers to the use of a group of technologies together"

(Wikipedia)


Ajax is

• Short for Asynchronous JavaScript And XML
• New approach to use a number of existing technologies together :
–XHTML & CSS (standard presentation display)
–Document Object Model (DOM) (dynamic display & interaction)
–XML & XSLT (data interchange & manipulation)
–xmlHTTPRequest (asynchronous data retrieval)
–Javascript (to put together all the above)



How Ajax is Different?

"An Ajax application eliminates the start-stop-start-stop nature of interaction on the Web by introducing an intermediary — an Ajax engine — between the user and the server. It seems like adding a layer to the application would make it less responsive, but the opposite is true."


"The biggest challenges in creating Ajax applications are not technical. The core Ajax technologies are mature, stable, and well understood. Instead, the challenges are for the designers of these applications: to forget what we think we know about the limitations of the Web, and begin to imagine a wider, richer range of possibilities."
(Jesse James)

Monday, September 11, 2006

Send email through PHP script

Currently, I learnt to send email just using php script. It made me reliazed that PHP is very powerful server side language.

Below is an example that using php script to send email... Enjoy it!

$to = 'scleong@gmail.com';
$subject = 'Red alert!';
$message = 'yo, whassup?';
$headers = "From: admin@pknpk.gov.my\r\n" .
'X-Mailer: PHP/' . phpversion() . "\r\n" .
"MIME-Version: 1.0\r\n" .
"Content-Type: text/html; charset=utf-8\r\n" .
"Content-Transfer-Encoding: 8bit\r\n\r\n";
// Send
$is_send = mail($to, $subject, $message, $headers);
if ($is_send)
echo "email have been sent to $to successfully";
else
echo "Failed to send the E-mail.";