phpMailer , a great Email transfer class .

21 08 2006

Saved me a lot of work really .

I was looking for a way to use an smtp server ( microsoft exchange server in my case ) with the mail() function in php & since exchange is involved that means SMTP authentication is requierd as (relay is turned off) .
I had many results after searching, such as pear and other classes .
But phpMailer was effective and easier to use, it also support attachments , embeding & HTML format .

http://phpmailer.sourceforge.net/

here is a simple usage :

<?php
require(“class.phpmailer.php”);
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = “EmailserverHost”; // SMTP server
$mail->SMTPAuth = true;
$mail->Username = ‘username’;
$mail->Password = ‘password’;

$mail->FromName = ‘Moody’;
$mail->From = “youremail@yoursite.com”;//sender addy
$mail->AddAddress(“tosomeone@hisSite.com”);//recip. email addy

$mail->Subject = “Your Subject”;
$mail->Body = “hi ! \nBLA BLA BLA !”;
$mail->WordWrap = 50;

if(!$mail->Send())
{
echo “Message was not sent”;
echo “Mailer Error: ” . $mail->ErrorInfo;
}
else
{
echo “Message has been sent”;
}
?>

More examples and tutorials can be found @ http://phpmailer.sourceforge.net/tutorial.html

Documentation @ http://phpmailer.sourceforge.net/docs/

Advertisements




Good Bye Lady in Red , Welcome in Black Beast !!!

18 08 2006

My new sweet Beast … took me couple of weeks to locate this 🙂

Black Camaro SS 2001

As mentioned by the prev owner :

  • Corsa exhaust system
  • Dynatech Headers and y-pipe
  • lowered by eibach springs
  • tuned by bahrain dyno

355 HP to the wheel .. which makes nearly 400 HP to the engine
360 Torque .





PHP 101: PHP FOR THE ABSOLUTE BEGINNER

15 08 2006

A 15 parts of Unbelievable PHP 101 guide which will give you a solid knowledge base on PHP .
I Personally Recommend this site for Biggeners and Pros it can be a good reference too … 🙂

Many thanks to Vikram Vaswani for the great articles and explaining methods that made this easy to understand .

Time to role :
PHP 101: PHP FOR THE ABSOLUTE BEGINNER





Making Functions Re-usable (PHP Example)…

14 08 2006

Some how i been involved in creating few parts of http://www.hottdogzzbikinizz.com 😉 .
well i know what ya thinking , but its not like that *grin grin*…

One of the features i Developed was the JPG upload function [did’nt involve Mysql] …
what simply happens when you first submit the form it will check if you did’nt forget any field .
It will also check wether the submitted image is a JPEG/PJPEG otherwise it wont accept it …

the 2nd step is to process the uploaded image , Creates a folder with name-age-location of the submiter and stores the images in it.

3rd step is to send an email to the admin with all the user details , Image Location , and the actual Location( by ip ) of the submitter .

almost 300 lines of code ….

now lets see one of the examples :
imagine we want to create a folder for every user using his Name Age and Location assuming we already extracted the posted values into variables …

    $name
    $age
    $loc

$success = mkdir($name."-".$age."-".$loc,0777)
if(!$success) {

exit(‘something went wronge’);
}

this is ok , but what if i want to use the above code more than 100 times ?!
Copy & Paste …. ?
No ..

Lets see how can we make that re-usable …


function MakeDir($n,$a,$l) {$success = mkdir($n.”-“.$a.”-“.$l,0777);
if(!$success) {

exit(‘something went wronge’);
}
}

Now we can use that 1000 time with few lines of code ..
here is how …

MakeDir($name,$age,$loc);
MakeDir($name2,$age2,$loc3l);

//you can use a loop like [ foreach ( $x as $y ) etc …. ]

hope this was usefull …
now remember ..

Practice makes Perfect ...
🙂





looking for a Camaro 2001 – 2002

11 08 2006

Currently looking for a Camaro 2001 – 2002 :

Type: z28 , SS [if price is reasonable] .
MOD Prefered not to be Modified at all [stock].
Low Milage …
Excellent Condition …

So if anyone knows Who i should Contact , Please Do post the contact or send me and email to ..

neo_thinkers [at] hotmail.com
or nesscafeh [at] yahoo.com

ty 🙂

Camaro z28





New internet packages for residents from 2-connect !

9 08 2006

I just got this information …
nothing about the price , but it’ll be within the market price .so whats new ?

256 and 512 packages are uncapped … not to mention the contention ratio and overallSpeed….
the 1 Mb Package will be capped offcourse …

Google Earth aint blocked either 🙂

The Packages will be released in 10 Days ….
More information , soon i guess …

m0o .





Carolina Kluft , When Beauty & Strength blends …

8 08 2006

Carolina Kluft
Carolina Evelyn Klüft born on February 2, 1983 in Borås, is a Swedish athlete competing in heptathlon. Kluft’s mother was a long jumper and her dad a footballer so it’s no wonder their daughter headed for sporting greatness. She won the heptathlon at the World Athletics 2003 in Paris with a score of 7,001, ahead of France’s Eunice Barber, who had 6,755 points. She also won the heptathlon in the Olympic Games of 2004 in Athens at 6,952 points with a margin of 517 points. Klüft is the third woman to score 7,000 or more points at the heptathlon. Klüft has also competed successfully in Long Jump; at the 2004 IAAF World Indoor Championships she won bronze medal.

She has (as of July, 2006) won 1 gold medal in the Olympic Games, 3 gold and 1 bronze medal in the world championships and 2 gold and 1 bronze medal in the European championships.
She is currently regarded as one of the best female athletes in the world.

I also found this @ YouTube :
http://youtube.com/watch?v=AfMYfp8_0Q0


Go Go Go Go Go Go Go Go Carol 🙂

I dont know why do we lack of young people like her , Our gals are busy with Fashion Money Sex and Drugs …
now where did i hear that b4 lol !