How to create custom banners for myspace
MySpace is all about personalization. (more…)
January 19th, 2007
How to create custom banners for myspaceMySpace is all about personalization. (more…)
January 19th, 2007
A handy function to make PHPMailer a little more efficientIt is very easy to send an email with PHP. However, many people prefer to user PHP mailer, because it's more reliable and has great features. You can send through an SMTP server. You can include attachments, and log errors. However, rather than one simple line of code to the PHP mail() function, it requires like 10 lines of code or more to send one email. Well, if you send emails from various places within your application, you can create a function that can be referenced in one line of code, just like the mail() function. However, the function contains the defaults and the code to actually send the email through PHPmailer. Here's the function: include_once("phpmailer/class.phpmailer.php");
function sendMail($to, $subject, $body, $from="defaultfromemail@domain.com", $fromName="Default From Name") { $mail = new PHPMailer(); $mail->SetLanguage("en", $lang_path = SITE_DOC_ROOT . "/classes/phpmailer/language/") ; $mail->IsSMTP(); // telling the class to use SMTP $mail->Host = "localhost"; // SMTP server $Mail->Port = 25; $mail->SMTPAuth = true; $mail->Username = "username"; $mail->Password = "password"; $mail->From = $from; $mail->FromName = $fromName; $mail->AddAddress($to); $mail->Subject = stripslashes($subject); $mail->Body = stripslashes($body); //$mail->WordWrap = 120; return $mail->Send(); } This will return true of false, just like the mail() function!
January 19th, 2007
A Powerful MySQL GUI Management ToolI use MySQL on a daily basis, for all of my web applications. It's much faster to be able to interact with the databases and tables with a GUI tool rather that through the command line by using SQL statements. So obviously, I appreciate having a decent GUI. (more…)
January 19th, 2007
Access cPanel from behind a firewallThis is extremely cool, I just had to blog about it! Many company firewalls are very strict, blocking as many ports as possible. And because cPanel, WHM and cPanel webmail are on ports other than port 80 (ports 2082 and 2086 respectively), they will quite often be inaccessible. Well not anymore! (more…) |