text:
PHP Cookbook/Internet Services
From WikiContent
ColivArelt (Talk | contribs)
ColivArelt (Talk | contribs)
|Line 1:
|Line 1:
* [http://chiouricrel.com/tapasala.html bocdronpas]
http://acrelp.com/relcanodarvi.html[bocdronpas] [[http://acrelp.com/relcanodarvi.html][bocdronpas]]
* http://rolacelt.com/dronal.html bocdronpas
* [[http://acellac.com/rolacccnano.html bocdronpas]]
* [[http://boororba.com/riccnarelno.html|bocdronpas]]
* [[http://robova.com/trcololi.html | bocdronpas]]
* [http://varorc.com/caaclatadomr.html|bocdronpas]
* [bocdronpas|http://cabocdron.com/ouliouleto.html]
* ((http://domacracchi.com/acracr.html bocdronpas))
* [bocdronpas](http://letocod.com/pasdaro.html "bocdronpas")
{{PHP Cookbook/TOC}}
{{PHP Cookbook/TOC}}
Revision as of 14:54, 11 July 2009
Before there was HTTP, there was FTP, NNTP, IMAP, POP3, and a whole alphabet soup of other protocols. Many people quickly embraced web browsers because the browser provided an integrated program that let them check their email, read newsgroups, transfer files, and view documents without worrying about the details surrounding the underlying means of communication. PHP provides functions, both natively and through PEAR, to use these other protocols. With them, you can use PHP to create web frontend applications that perform all sorts of network-enabled tasks, such as looking up domain names or sending web-based email. While PHP simplifies these jobs, it is important to understand the strengths and limitations of each protocol.
Section 17.2 to Section 17.4 cover the most popular feature of all: email. Section 17.2 shows how to send basic email messages. Section 17.3 describes MIME-encoded email, which enables you to send plain-text and HTML-formatted messages. The IMAP and POP3 protocols, which are used to read mailboxes, are discussed in Section 17.4.
The next two recipes discuss how to read newsgroups with NNTP. Newsgroups are similar to mailing lists, but instead of every person on the list receiving an email message, people can access a news server and view just the messages they're interested in. Newsgroups also allow threaded discussions, so its easy to trace a conversation through the archives. Section 17.5 discusses posting messages, while Section 17.6 covers retrieving messages.
Section 17.7 covers how to exchange files using FTP. FTP, or file transfer protocol, is a method for sending and receiving files across the Internet. FTP servers can require users to log in with a password or allow anonymous usage.
Searching LDAP servers is the topic of Section 17.8, while Section 17.9 discusses how to authenticate users against an LDAP server. LDAP servers are used as address books and as a centralized store for user information. They're optimized for information retrieval and can be configured to replicate their data to ensure high reliability and quick response times.
The chapter concludes with recipes on networking. Section 17.10 covers DNS lookups, both from domain name to IP and vice versa. The final recipe tells how to check if a host is up and accessible with PEAR's Ping module.
Other parts of the book deal with some network protocols as well. HTTP is covered in detail in Chapter 11. Those recipes discuss how to fetch URLs in a variety of different ways. Protocols that combine HTTP and XML are covered in Chapter 12. In that chapter, along with covering DOM and XSLT, we discuss the emerging area of web services, using the XML-RPC and SOAP protocols.
Sending Mail
You want to send an email message. This can be in direct response to a user's action, such as signing up for your site, or a recurring event at a set time, such as a weekly newsletter.
Use PEAR's Mail class:
require 'Mail.php'; $to = 'firstname.lastname@example.com'; $headers['From'] = 'firstname.lastname@example.com'; $headers['Subject'] = 'New Version of PHP Released!'; $body = 'Go to http://www.php.net and download it today!'; $message =& Mail::factory('mail'); $message->send($to, $headers, $body);
If you can't use PEAR's Mail class, use PHP's built-in mail( ) function:
$to = 'email@example.com'; $subject = 'New Version of PHP Released!'; $body = 'Go to http://www.php.net and download it today!'; mail($to, $subject, $body);
PEAR's Mail class allows you to send mail three ways. You indicate the method to use when instantiating a mail object with Mail::factory( ).
- To send mail using an external program such as sendmail or qmail, pass sendmail.
- To use an SMTP server, pass smtp.
- To use the built-in mail( ) function, pass mail. This tells Mail to apply the settings from your php.ini .
To use sendmail or smtp, you have to pass a second parameter indicating your settings. To use sendmail, specify a sendmail_path and sendmail_args:
$params['sendmail_path'] = '/usr/sbin/sendmail'; $params['sendmail_args'] = '-oi -t'; $message =& Mail::factory('sendmail', $params);
One good value for sendmail_path is /usr/lib/sendmail. Unfortunately, sendmail tends to jump around from system to system, so it can be hard to track down. If you can't find it, try /usr/sbin/sendmail or ask your system administrator.
Two useful flags to pass sendmail are -oi and -t. The -oi flag tells sendmail not to think a single dot (.) on a line is the end of the message. The -t flag makes sendmail parse the file for To: and other header lines.
If you prefer qmail, try using /var/qmail/bin/qmail-inject or /var/qmail/bin/sendmail.
If you're running Windows, you may want to use an SMTP server because most Windows machines don't have copies of sendmail installed. To do so, pass smtp:
$params['host'] = 'smtp.example.com'; $message =& Mail::factory('smtp', $params);
In smtp mode, you can pass five optional parameters. The host is the SMTP server hostname; it defaults to localhost. The port is the connection port; it defaults to 25. To enable SMTP authentication, set auth to true. To allow the server to validate you, set username and password. SMTP functionality isn't restricted to Windows; it also works on Unix servers.
If you don't have PEAR's Mail class, you can use the built-in mail( ) function. The program mail( ) uses to send mail is specified in the sendmail_path configuration variable in your php.ini file. If you're running Windows, set the SMTP variable to the hostname of your SMTP server. Your From address comes from the sendmail_from variable.
Here's an example that uses mail( ):
$to = 'email@example.com'; $subject = 'New Version of PHP Released!'; $body = 'Go to http://www.php.net and download it today!'; mail($to, $subject, $body);
The first parameter is the recipient's email address, the second is the message subject, and the last is the message body. You can also add extra headers with an optional fourth parameter. For example, here's how to add Reply-To and Organization headers:
$to = 'firstname.lastname@example.com'; $subject = 'New Version of PHP Released!'; $body = 'Go to http://www.php.net and download it today!'; $header = "Reply-To: firstname.lastname@example.com\r\n" ."Organization: The PHP Group"; mail($to, $subject, $body, $header);
Separate each header with \r\n, but don't add \r\n following the last header.
Regardless of which method you choose, it's a good idea to write a wrapper function to assist you in sending mail. Forcing all your mail through this function makes it easy to add logging and other checks to every message sent:
function pc_mail($to, $headers, $body) { $message =& Mail::factory('mail'); $message->send($to, $headers, $body); error_log("[MAIL][TO: $to]"); }
Here a message is written to the error log, recording the recipient of each message that's sent. This provides a time stamp that allows you to more easily track complaints that someone is trying to use the site to send spam. Another option is to create a list of "do not send" email addresses, which prevent those people from ever receiving another message from your site. You can also validate all recipient email addresses, which reduces the number of bounced messages.
See Also
Section 13.6 for a regular expression to validate email addresses; Section 17.3 for sending MIME email; Section 17.4 for more on retrieving mail; documentation on mail( ) at http://www.php.net/mail; the PEAR Mail class at http://pear.php.net/package-info.php?package=Mail; RFC 822 at http://www.faqs.org/rfcs/rfc822.html; O'Reilly publishes two books on sendmail, called sendmail by Bryan Costales with Eric Allman and sendmail Desktop Reference by Bryan Costales and Eric Allman.
Sending MIME Mail
You want to send MIME email. For example, you want to send multipart messages with both plain-text and HTML portions and have MIME-aware mail readers automatically display the correct portion.
Use the Mail_mime class in PEAR:
require 'Mail.php'; require 'Mail/mime.php'; $to = 'email@example.com, email@example.com'; $headers['From'] = 'firstname.lastname@example.com'; $headers['Subject'] = 'New Version of PHP Released!'; // create MIME object $mime = new Mail_mime; // add body parts $text = 'Text version of email'; $mime->setTXTBody($text); $html = 'HTML version of email'; $mime->setHTMLBody($html); $file = '/path/to/file.png'; $mime->addAttachment($file, 'image/png'); // get MIME formatted message headers and body $body = $mime->get(); $headers = $mime->headers($headers); $message =& Mail::factory('mail'); $message->send($to, $headers, $body);
PEAR's Mail_mime class provides an object-oriented interface to all the behind-the-scenes details involved in creating an email message that contains both text and HTML parts. The class is similar to PEAR's Mail class, but instead of defining the body as a string of text, you create a Mail_mime object and call its methods to add parts to the body:
// create MIME object $mime = new Mail_mime; // add body parts $text = 'Text version of email'; $mime->setTXTBody($text); $html = 'HTML version of email'; $mime->setHTMLBody($html); $file = '/path/to/file.txt'; $mime->addAttachment($file, 'text/plain'); // get MIME formatted message headers and body $body = $mime->get(); $headers = $mime->headers($headers);
The Mail_mime::setTXTBody( ) and Mail_mime::setHTMLBody( ) methods add the plaintext and HTML body parts, respectively. Here, we pass in variables, but you can also pass a filename for Mail_mime to read. To use this option, pass true as the second parameter:
$text = '/path/to/email.txt'; $mime->setTXTBody($text, true);
To add an attachment to the message, such as a graphic or an archive, call Mail_mime::addAttachment( ) :
$file = '/path/to/file.png'; $mime->addAttachment($file,'image/png');
Pass the function to the location to the file and its MIME type.
Once the message is complete, do the final preparation and send it out:
// get MIME formatted message headers and body $body = $mime->get( ); $headers = $mime->headers($headers); $message =& Mail::factory('mail'); $message->send($to, $headers, $body);
First, you have the Mail_mime object provide properly formatted headers and body. You then use the parent Mail class to format the message and send it out with Mail_mime::send( ) .
See Also
Section 17.2 for sending regular email; Section 17.4 for more on retrieving mail; the PEAR Mail_Mime class at http://pear.php.net/package-info.php?package=Mail_Mime.
Reading Mail with IMAP or POP3
You want to read mail using IMAP or POP3, which allows you to create a web-based email client.
Use PHP's IMAP extension, which speaks both IMAP and POP3:
// open IMAP connection $mail = imap_open('{mail.server.com:143}', 'username', 'password'); // or, open POP3 connection $mail = imap_open('{mail.server.com:110/pop3}', 'username', 'password'); // grab a list of all the mail headers $headers = imap_headers($mail); // grab a header object for the last message in the mailbox $last = imap_num_msg($mail); $header = imap_header($mail, $last); // grab the body for the same message $body = imap_body($mail, $last); // close the connection imap_close($mail);
The underlying library PHP uses to support IMAP and POP3 offers a seemingly unending number of features that allow you to essentially write an entire mail client. With all those features, however, comes complexity. In fact, there are currently 63 different functions in PHP beginning with the word imap, and that doesn't take into account that some also speak POP3 and NNTP.
However, the basics of talking with a mail server are straightforward. Like many features in PHP, you begin by opening the connection and grabbing a handle:
$mail = imap_open('{mail.server.com:143}', 'username', 'password');
This opens an IMAP connection to the server named mail.server.com on port 143. It also passes along a username and password as the second and third arguments.
To open a POP3 connection instead, append /pop3 to the end of the server and port. Since POP3 usually runs on port 110, add :110 after the server name:
$mail = imap_open('{mail.server.com:110/pop3}', 'username', 'password');
To encrypt your connection with SSL, add /ssl on to the end, just as you did with pop3. You also need to make sure your PHP installation is built with the --with-imap-ssl configuration option in addition to --with-imap. Also, you need to build the system IMAP library itself with SSL support. If you're using a self-signed certificate and wish to prevent an attempted validation, also add /novalidate-cert. Finally, most SSL connections talk on either port 993 or 995. All these options can come in any order, so the following is perfectly legal:
$mail = imap_open('{mail.server.com:993/novalidate-cert/pop3/ssl}', 'username', 'password');
Surrounding a variable with curly braces inside of a double-quoted string, such as {$var}, is a way to tell PHP exactly which variable to interpolate. Therefore, to use interpolated variables in this first parameter to imap_open( ) , escape the opening {:
$server = 'mail.server.com'; $port = 993; $mail = imap_open("\{$server:$port}", 'username', 'password');
Once you've opened a connection, you can ask the mail server a variety of questions. To get a listing of all the messages in your inbox, use imap_headers( ) :
$headers = imap_headers($mail);
This returns an array in which each element is a formatted string corresponding to a message:
A 189) 5-Aug-2002 Beth Hondl an invitation (1992 chars)
Alternatively, to retrieve a specific message, use imap_header( ) and imap_body( ) to pull the header object and body string:
$header = imap_header($message_number); $body = imap_body($message_number);
The imap_header( ) function returns an object with many fields. Useful ones include subject, fromaddress, and udate. All the fields are listed in Table 17-2 in Section 17.6.
The body element is just a string, but, if the message is a multipart message, such as one that contains both a HTML and a plain-text version, $body holds both parts and the MIME lines describing them:
------=_Part_1046_3914492.1008372096119 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Plain-Text Message ------=_Part_1046_3914492.1008372096119 Content-Type: text/html Content-Transfer-Encoding: 7bit HTML Message ------=_Part_1046_3914492.1008372096119--
To avoid this occurrence, use imap_fetchstructure( ) in combination with imap_fetchbody( ) to discover how the body is formatted and to extract just the parts you want:
// pull the plain text for message $n $st = imap_fetchstructure($mail, $n); if (!empty($st->parts)) { for ($i = 0, $j = count($st->parts); $i < $j; $i++) { $part = $st->parts[$i]; if ($part->subtype == 'PLAIN') { $body = imap_fetchbody($mail, $n, $i+1); } } } else { $body = imap_body($mail, $n)); }
If a message has multiple parts, $st->parts holds an array of objects describing them. The part property holds an integer describing the main body MIME type. Table 17-1 lists which numbers go with which MIME types. The subtype property holds the MIME subtype and tells if the part is plain, html, png, or another type, such as octet-stream.
Table 17-1. IMAP MIME type values
|MIME type
|PHP constant
|Unformatted text
|Plain text, HTML, XML
|Multipart message
|Mixed, form data, signed
|Encapsulated message
|News, HTTP
|Application data
|Octet stream, PDF, Zip
|Music file
|MP3, RealAudio
|Graphic image
|Video clip
|MPEG, Quicktime
|Everything else
|VRML models
See Also
Section 17.2 and Section 17.4 for more on sending mail; documentation on imap_open( ) at http://www.php.net/imap_open, imap_header( ) at http://www.php.net/imap-header, imap-body( ) at http://www.php.net/imap-body, and IMAP in general at http://www.php.net/imap.
Posting Messages to Usenet Newsgroups
You want to post a message to a Usenet newsgroup, such as comp.lang.php.
Use imap_mail_compose( ) to format the message, then write the message to the server using sockets:
$headers['from'] = 'email@example.com'; $headers['subject'] = 'New Version of PHP Released!'; $headers['custom_headers'][] = 'Newsgroups: comp.lang.php'; $body[0]['type'] = TYPETEXT; $body[0]['subtype'] = 'plain'; $body[0]['contents.data'] = 'Go to http://www.php.net and download it today!'; $post = imap_mail_compose($headers, $body); $server = 'nntp.example.com'; $port = 119; $sh = fsockopen($server, $port) or die ("Can't connect to $server."); fputs($sh, "POST\r\n"); fputs($sh, $post); fputs($sh, ".\r\n"); fclose($sh);
No built-in PHP functions can post a message to a newsgroup. Therefore, you must open a direct socket connection to the news server and send the commands to post the message. However, you can use imap_mail_compose( ) to format a post and create the headers and body for the message. Every message must have three headers: the From: address, the message Subject:, and the name of the newsgroup:
$headers['from'] = 'firstname.lastname@example.com'; $headers['subject'] = 'New Version of PHP Released!'; $headers['custom_headers'][ ] = 'Newsgroups: comp.lang.php';
Create an array, $headers, to hold the message headers. You can directly assign the values for the From: and Subject: headers, but you can't do so for the Newsgroups: header. Because imap_mail_compose( ) is most frequently used to create email messages, the Newsgroups: header is not a predefined header. To work around this, you must instead add it with the custom_headers array element.
There is a different syntax for the custom_headers. Instead of placing the lowercase header name as the element name and the header value as the array value, place the entire header as an array value. Between the header name and value, add a colon followed by a space. Be sure to correctly spell Newsgroups: with a capital N and final s.
The message body can contain multiple parts. As a result, the body parameter passed to imap_mail_compose( ) is an array of arrays. In the Solution, there was only one part, so we directly assign values to $body[0]:
$body[0]['type'] = TYPETEXT; $body[0]['subtype'] = 'plain'; $body[0]['contents.data'] = 'Go to http://www.php.net and download it today!';
Each message part needs a MIME type and subtype. This message is ASCII, so the type is TYPETEXT, and the subtype is plain. Refer back to Table 17-1 in Section 17.4 for a listing of IMAP MIME type constants and what they represent. The contents.data field holds the message body.
To convert these arrays into a formatted string call imap_mail_compose($body, $headers) . It returns a post that looks like this:
From: firstname.lastname@example.com Subject: New Version of PHP Released! MIME-Version: 1.0 Content-Type: TEXT/plain; CHARSET=US-ASCII Newsgroups: comp.lang.php Go to http://www.php.net and download it today!
Armed with a post the news server will accept, call fsockopen( ) to open a connection:
$server = 'nntp.example.com'; $port = 119; $sh = fsockopen($server, $port) or die ("Can't connect to $server.");
The first parameter to fsockopen( ) is the hostname of the server, and the second is the port to use. If you don't know the name of your news server, try the hostnames news, nntp, or news-server in your domain: for example, news.example.com, nntp.example.com, or news-server.example.com. If none of these work, ask your system administrator. Traditionally, all news servers use port 119.
Once connected, you send the message:
fputs($sh, "POST\r\n"); fputs($sh, imap_mail_compose($headers, $body)); fputs($sh, ".\r\n");
The first line tells the news server that you want to post a message. The second is the message itself. To signal the end of the message, place a period on a line by itself. Every line must have both a carriage return and a newline at the end. Close the connection by calling fclose($sh) .
Every message on the server is given a unique name, known as a Message-ID . If you want to reply to a message, take the Message-ID of the original message and use it as the value for a References header:
// retrieved when reading original message $message_id = '<firstname.lastname@example.com>'; $headers['custom_headers'][] = "References: $message_id";
See Also
Section 17.6 for more on reading newsgroups; documentation on imap_mail_compose( ) at http://www.php.net/imap-mail-compose, fsockopen( ) at http://www.php.net/fsockopen, fputs( ) at http://www.php.net/fputs, and fclose( ) at http://www.php.net/fclose; RFC 977 at http://www.faqs.org/rfcs/rfc977.html.
Reading Usenet News Messages
You want to read Usenet news messages using NNTP to talk to a news server.
Use PHP's IMAP extension. It also speaks NNTP:
// open a connection to the nntp server $server = '{news.php.net/nntp:119}'; $group = 'php.general'; // main PHP mailing list $nntp = imap_open("$server$group", '', '', OP_ANONYMOUS); // get header $header = imap_header($nntp, $msg); // pull out fields $subj = $header->subject; $from = $header->from; $email = $from[0]->mailbox."@".$from[0]->host; $name = $from[0]->personal; $date = date('m/d/Y h:i A', $header->udate); // get body $body = nl2br(htmlspecialchars(imap_fetchbody($nntp,$msg,1))); // close connection imap_close($nntp);
Reading news from a news server requires you to connect to the server and specify a group you're interested in reading:
// open a connection to the nntp server $server = "{news.php.net/nntp:119}"; $group = "php.general"; $nntp = imap_open("$server$group",'','',OP_ANONYMOUS);
The function imap_open( ) takes four parameters. The first specifies the news server to use and the newsgroup to read. The server here is news.php.net , the news server that mirrors all the PHP mailing lists. Add /nntp to let the IMAP extension know you're reading news instead of mail, and specify 119 as a port; that's typically the port reserved for NNTP. NNTP stands for Network News Transport Protocol; it's used to communicate with news servers, just as HTTP communicates with web servers. The group is php.general, the main mailing list of the PHP community.
The middle two arguments to imap_open( ) are a username and password, in case you need to provide verification of your identity. Because news.php.net is open to all readers, leave them blank. Finally, pass the flag OP_ANONYMOUS, which tells IMAP you're an anonymous reader; it will not then keep a record of you in a special .newsrc file.
Once you're connected, you usually want to either get a general listing of recent messages or all the details about one specific message. Here's some code that displays recent messages:
// read and display posting index $last = imap_num_msg($nntp); $n = 10; // display last 10 messages // table header print <<<EOH

 Subject	 Sender	 Date
 EOH; // the messages for ($i = $last-$n+1; $i <= $last; $i++) { $header = imap_header($nntp, $i); if (! $header->Size) { continue; } $subj = $header->subject; $from = $header->from; $email = $from[0]->mailbox."@".$from[0]->host; $name = $from[0]->personal ? $from[0]->personal : $email; $date = date('m/d/Y h:i A', $header->udate); print <<<EOM
 $subj	 $name	 $date
 EOM; } // table footer echo "
\n";
To browse a listing of posts, you need to specify what you want by number. The first post ever to a group gets number 1, and the most recent post is the number returned from imap_num_msg( ). So, to get the last $n messages, loop from $last-$n+1 to $last.
Inside the loop, call imap_header( ) to pull out the header information about a post. The header contains all the metainformation but not the actual text of the message; that's stored in the body. Because the header is usually much smaller than the body, this allows you to quickly retrieve data for many posts without taking too much time.
Now pass imap_header( ) two parameters: the server connection handle and the message number. It returns an object with many properties, which are listed in Table 17-2.
Table 17-2. imap_header( ) fields from a NNTP server
|date or Date
|RFC 822 formatted date: date('r')
|Fri, 16 Aug 2002 01:52:24 -0400
|subject or Subject
|Message subject
|Re: PHP Cookbook Revisions
|A unique ID identifying the message
|<20030410020818. email@example.com>
|The name of the group the message was posted to
|The address the message was sent to
|Parsed version of toaddress field
|mailbox: "php-general", host: "lists-php.net"
|The address that sent the message
|Ralph Josephs <email@example.com>
|Parsed version of fromaddress field
|personal: "Ralph Josephs", mailbox: "ralph", host: "example.net"
|The address you should reply to, if you're trying to contact the author
|Parsed version of reply_toaddress field
|Mailbox: "rjosephs", host: "example.net"
|The person who sent the message; almost always identical to the from field, but if the from field doesn't uniquely identify who sent the message, this field does
|Ralph Josephs <email@example.com>
|Parsed version of senderaddress field
|Personal: "Ralph Josephs", mailbox: "ralph", host: "example.net"
|If the message is recent, or new since the last time the user checked for mail
|Y or N
|If the message is unseen
|Y or " "
|If the message is marked
|Y or " "
|If a reply has been sent to this message
|Y or " "
|If the message is deleted
|Y or " "
|If the message is a draft
|Y or " "
|Size of the message in bytes
|Unix timestamp of message date
|The number of the message in the group
Some of the more useful fields are: size, subject, the from list, and udate. The size property is the size of the message in bytes; if it's 0, the message was either deleted or otherwise removed. The subject field is the subject of the post. The from list is more complicated. It's an array of objects; each element in the array holds an object with three properties: personal, mailbox and host. The personal field is the name of the poster: Homer Simpson. The mailbox field is the part of the email address before the @ sign: homer. The host is the part of the email address after the @ sign: thesimpsons.com. Usually, there's just one element in the from list array, because a message usually has just one sender.
Pull the $header->from object into $from because PHP can't directly access $header->from[0]->personal due to the array in the middle. Then combine $from[0]->mailbox and $from[0]->host to form the poster's email address. Use the ternary operator to assign the personal field as the poster's name, if one is supplied; otherwise, make it the email address.
The udate field is the posting time as an Unix timestamp. Use date( ) to convert it from seconds to a more human-friendly format.
You can also view a specific posting as follows:
// read and display a single message $header = imap_header($nntp, $msg); $subj = $header->subject; $from = $header->from; $email = $from[0]->mailbox."@".$from[0]->host; $name = $from[0]->personal; $date = date('m/d/Y h:i A', $header->udate); $body = nl2br(htmlspecialchars(imap_fetchbody($nntp,$msg,1))); print <<<EOM

 From:	 $name <$email>

 Subject:	 $subj

 Date:	 $date

 $body

 EOM;
The code to grab a single message is similar to one that grabs a sequence of message headers. The main difference is that you define a $body variable that's the result of three chained functions. Innermost, you call imap_fetchbody( ) to return the message body; it takes the same parameters as imap_header( ). You pass that to htmlspecialchars( ) to escape any HTML that may interfere with yours. That result then is passed to nl2br( ) , which converts all the carriage returns to XHTML
 tags; the message should now look correct on a web page.
To disconnect from the IMAP server and close the stream, pass the IMAP connection handle to imap_close( ) :
// close connection when finished imap_close($nntp);
See Also
Section 17.5 for more on posting to newsgroups; documentation on imap_open( ) at http://www.php.net/imap-open, imap_header( ) at http://www.php.net/imap-header, imap_body( ) at http://www.php.net/imap-body, and IMAP in general at http://www.php.net/imap; code to read newsgroups in PHP without using IMAP at http://cvs.php.net/cvs.php/php-news-web; RFC 977 at http://www.faqs.org/rfcs/rfc977.html.
Getting and Putting Files with FTP
You want to transfer files using FTP.
Use PHP's built-in FTP functions:
$c = ftp_connect('ftp.example.com') or die("Can't connect"); ftp_login($c, $username, $password) or die("Can't login"); ftp_put($c, $remote, $local, FTP_ASCII) or die("Can't transfer"); ftp_close($c); or die("Can't close");
You can also use the cURL extension:
$c = curl_init("ftp://$username:$email@example.com/$remote"); // $local is the location to store file on local machine $fh = fopen($local, 'w') or die($php_errormsg); curl_setopt($c, CURLOPT_FILE, $fh); curl_exec($c); curl_close($c);
FTP stands for File Transfer Protocol and is a method of exchanging files between one computer and another. Unlike with HTTP servers, it's easy to set up an FTP server to both send and receive files.
Using the built-in FTP functions doesn't require additional libraries, but you must specifically enable them with --enable-ftp . Because these functions are specialized to FTP, they're easy to use when transferring files.
All FTP transactions begin with establishing a connection from your computer, the local client, to another computer, the remote server:
$c = ftp_connect('ftp.example.com') or die("Can't connect");
Once connected, you need to send your username and password; the remote server can then authenticate you and allow you to enter:
ftp_login($c, $username, $password) or die("Can't login");
Some FTP servers support a feature known as anonymous FTP. Under anonymous FTP, users can log in without an account on the remote system. When you use anonymous FTP, your username is anonymous, and your password is your email address.
Here's how to transfer files with ftp_put( ) and ftp_get( ):
ftp_put($c, $remote, $local, FTP_ASCII) or die("Can't transfer"); ftp_get($c, $local, $remote, FTP_ASCII) or die("Can't transfer");
The ftp_put( ) function takes a file on your computer and copies it to the remote server; ftp_get( ) copies a file on the remote server to your computer. In the previous code, $remote is the pathname to the remote file, and $local points at the file on your computer.
There are two final parameters passed to these functions. The FTP_ASCII parameter, used here, transfers the file as if it were ASCII text. Under this option, linefeed endings are automatically converted as you move from one operating system to another. The other option is FTP_BINARY , which is used for nonplaintext files, so no linefeed conversions take place.
Use ftp_fget( ) and ftp_fput( ) to download or upload a file to an existing open file pointer (opened using fopen( )) instead of to a location on the filesystem. For example, here's how to retrieve a file and write it to the existing file pointer, $fp:
$fp = fopen($file, 'w'); ftp_fget($c, $fp, $remote, FTP_ASCII) or die("Can't transfer");
Finally, to disconnect from the remote host, call ftp_close( ) to log out:
ftp_close($c); or die("Can't close");
To adjust the amount of seconds the connection takes to time out, use ftp_set_option( ) :
// Up the time out value to two minutes: set_time_limit(120) $c = ftp_connect('ftp.example.com'); ftp_set_option($c, FTP_TIMEOUT_SEC, 120);
The default value is 90 seconds; however, the default max_execution_time of a PHP script is 30 seconds. So, if your connection times out too early, be sure to check both values.
To use the cURL extension, you must download cURL from http://curl.haxx.se/ and set the --with-curl configuration option when building PHP. To use cURL, start by creating a cURL handle with curl_init( ) , and then specify what you want to do using curl_setopt( ). The curl_setopt( ) function takes three parameters: a cURL resource, the name of a cURL constant to modify, and value to assign to the second parameter. In the Solution, the CURLOPT_FILE constant is used:
$c = curl_init("ftp://$username:$firstname.lastname@example.com/$remote"); // $local is the location to store file on local client $fh = fopen($local, 'w') or die($php_errormsg); curl_setopt($c, CURLOPT_FILE, $fh); curl_exec($c); curl_close($c);
You pass the URL to use to curl_init( ). Because the URL begins with ftp://, cURL knows to use the FTP protocol. Instead of a separate call to log on to the remote server, you embed the username and password directly into the URL. Next, you set the location to store the file on your server. Now you open a file named $local for writing and pass the file handle to curl_setopt( ) as the value for CURLOPT_FILE. When cURL transfers the file, it automatically writes to the file handle. Once everything is configured, you call curl_exec( ) to initiate the transaction and then curl_close( ) to close the connection.
See Also
Documentation on the FTP extension at http://www.php.net/ftp and cURL at http://www.php.net/curl; RFC 959 at http://www.faqs.org/rfcs/rfc969.html .
Looking Up Addresses with LDAP
You want to query an LDAP server for address information.
Use PHP's LDAP extension:
$ds = ldap_connect('ldap.example.com') or die($php_errormsg); ldap_bind($ds) or die($php_errormsg); $sr = ldap_search($ds, 'o=Example Inc., c=US', 'sn=*') or die($php_errormsg); $e = ldap_get_entries($ds, $sr) or die($php_errormsg); for ($i=0; $i < $e['count']; $i++) { echo $info[$i]['cn'][0] . ' (' . $info[$i]['mail'][0] . ')
'; } ldap_close($ds) or die($php_errormsg);
LDAP stands for Lightweight Directory Access Protocol. An LDAP server stores directory information, such as names and addresses, and allows you to query it for results. In many ways, it's like a database, except that it's optimized for storing information about people.
In addition, instead of the flat structure provided by a database, an LDAP server allows you to organize people in a hierarchical fashion. For example, employees may be divided into marketing, technical, and operations divisions, or they can be split regionally into North America, Europe, and Asia. This makes it easy to find all employees of a particular subset of a company.
When using LDAP, the address repository is called as a data source. Each entry in the repository has a globally unique identifier, known as a distinguished name. The distinguished name includes both a person's name, but also their company information. For instance, John Q. Smith, who works at Example Inc., a U.S. company has a distinguished name of cn=John Q. Smith, o=Example Inc., c=US. In LDAP, cn stands for common name, o for organization, and c for country.
You must enable PHP's LDAP support with --with-ldap. You can download an LDAP server from http://www.openldap.org. This recipe assumes basic knowledge about LDAP. For more information, read the articles on the O'Reilly Network at http://www.onlamp.com/topics/apache/ldap.
Communicating with an LDAP server requires four steps: connecting, authenticating, searching records, and logging off. Besides searching, you can also add, alter, and delete records.
The opening transactions require you to connect to a specific LDAP server and then authenticate yourself in a process known as binding :
$ds = ldap_connect('ldap.example.com') or die($php_errormsg); ldap_bind($ds) or die($php_errormsg);
Passing only the connection handle, $ds, to ldap_bind( ) does an anonymous bind. To bind with a specific username and password, pass them as the second and third parameters, like so:
ldap_bind($ds, $username, $password) or die($php_errormsg);
Once logged in, you can request information. Because the information is arranged in a hierarchy, you need to indicate the base distinguished name as the second parameter. Finally, you pass in the search criteria. For example, here's how to find all people with a surname of Jones at company Example Inc. located in the country US:
$sr = ldap_search($ds, 'o=Example Inc., c=US', 'sn=Jones') or die($php_errormsg); $e = ldap_get_entries($ds, $sr) or die($php_errormsg);
Once ldap_search( ) returns results, use ldap_get_entries( ) to retrieve the specific data records. Then iterate through the array of entries, $e:
for ($i=0; $i < $e['count']; $i++) { echo $e[$i]['cn'][0] . ' (' . $e[$i]['mail'][0] . ')
'; }
Instead of doing count($e), use the precomputed record size located in $e['count']. Inside the loop, print the first common name and email address for each record. For example:
David Sklar (email@example.com) Adam Trachtenberg (email@example.com)
The ldap_search( ) function searches the entire tree equal to and below the distinguished name base. To restrict the results to a specific level, use ldap_list( ) . Because the search takes place over a smaller set of records, ldap_list( ) can be significantly faster than ldap_search( ).
See Also
Section 17.8 for authenticating users with LDAP; documentation on LDAP at http://www.php.net/ldap; RFC 2251 at http://www.faqs.org/rfcs/rfc2251.html.
Using LDAP for User Authentication
You want to restrict parts of your site to authenticated users. Instead of verifying people against a database or using HTTP Basic authorization, you want to use an LDAP server. Holding all user information in an LDAP server makes centralized user administration easier.
Use PEAR's Auth class, which supports LDAP authentication:
$options = array('host' => 'ldap.example.com', 'port' => '389', 'base' => 'o=Example Inc., c=US', 'userattr' => 'uid'); $auth = new Auth('LDAP', $options); // begin validation // print login screen for anonymous users $auth->start(); if ($auth->getAuth()) { // content for validated users } else { // content for anonymous users } // log users out $auth->logout();
LDAP servers are designed for address storage, lookup, and retrieval, and so are better to use than standard databases like MySQL or Oracle. LDAP servers are very fast, you can easily implement access control by granting different permissions to different groups of users, and many different programs can query the server. For example, most email clients can use an LDAP server as an address book, so if you address a message to "John Smith," the server replies with John's email address, email@example.com.
PEAR's Auth class allows you to validate users against files, databases, and LDAP servers. The first parameter is the type of authentication to use, and the second is an array of information on how to validate users. For example:
$options = array('host' => 'ldap.example.com', 'port' => '389', 'base' => 'o=Example Inc., c=US', 'userattr' => 'uid'); $auth = new Auth('LDAP', $options);
This creates a new Auth object that validates against an LDAP server located at ldap.example.com and communicates over port 389. The base directory name is o=Example Inc., c=US, and usernames are checked against the uid attribute. The uid field stands for user identifier. This is normally a username for a web site or a login name for a general account. If your server doesn't store uid attributes for each user, you can substitute the cn attribute. The common name field holds a user's full name, such as "John Q. Smith."
The Auth::auth( ) method also takes an optional third parameter â the name of a function that displays the sign-in form. This form can be formatted however you wish; the only requirement is that the form input fields must be called username and password. Also, the form must submit the data using POST.
$options = array('host' => 'ldap.example.com', 'port' => '389', 'base' => 'o=Example Inc., c=US', 'userattr' => 'uid'); function pc_auth_ldap_signin() { print<<<_HTML_ <form method="post" action="$_SERVER[PHP_SELF]"> Name: <input name="username" type="text">
 Password: <input name="password" type="password">
 <input type="submit" value="Sign In"> </form> _HTML_; } $auth = new Auth('LDAP', $options, 'pc_auth_ldap_signin');
Once the Auth object is instantiated, authenticate a user by calling Auth::start( ) :
If the user is already signed in, nothing happens. If the user is anonymous, the sign-in form is printed. To validate a user, Auth::start( ) connects to the LDAP server, does an anonymous bind, and searches for an address in which the user attribute specified in the constructor matches the username passed in by the form:
$options['userattr'] = = $_POST['username']
If Auth::start( ) finds exactly one person that fits this criteria, it retrieves the designated name for the user, and attempts to do an authenticated bind, using the designated name and password from the form as the login credentials. The LDAP server then compares the password to the userPassword attribute associated with the designated name. If it matches, the user is authenticated.
You can call Auth::getAuth( ) to return a boolean value describing a user's status:
if ($auth->getAuth( )) { print 'Welcome member! Nice to see you again.'; } else { print 'Welcome guest. First time visiting?'; }
The Auth class uses the built-in session module to track users, so once validated, a person remains authenticated until the session expires, or you explicitly log them out with:
$auth->logout( );
See Also
Section 17.8 for searching LDAP servers; PEAR's Auth class at http://pear.php.net/package-info.php?package=Auth.
Performing DNS Lookups
You want to look up a domain name or an IP address.
Use gethostbyname( ) and gethostbyaddr( ):
$ip = gethostbyname('www.example.com'); // 220.127.116.11 $host = gethostbyaddr('18.104.22.168'); // www.example.com
You can't trust the name returned by gethostbyaddr( ) . A DNS server with authority for a particular IP address can return any hostname at all. Usually, administrators set up DNS servers to reply with a correct hostname, but a malicious user may configure her DNS server to reply with incorrect hostnames. One way to combat this trickery is to call gethostbyname( ) on the hostname returned from gethostbyaddr( ) and make sure the name resolves to the original IP address.
If either function can't successfully look up the IP address or the domain name, it doesn't return false, but instead returns the argument passed to it. To check for failure, do this:
if ($host == ($ip = gethostbyname($host))) { // failure }
This assigns the return value of gethostbyname( ) to $ip and also checks that $ip is not equal to the original $host.
Sometimes a single hostname can map to multiple IP addresses. To find all hosts, use gethostbynamel( ) :
$hosts = gethostbynamel('www.yahoo.com'); print_r($hosts); Array ( [0] => 220.127.116.11 [1] => 184.108.40.206 [2] => 18.104.22.168 [3] => 22.214.171.124 [4] => 22.214.171.124 [5] => 126.96.36.199 [6] => 188.8.131.52 [7] => 126.96.36.199 [8] => 220.127.116.11 )
In contrast to gethostbyname( ) and gethostbyaddr( ), gethostbynamel( ) returns an array, not a string.
You can also do more complicated DNS-related tasks. For instance, you can get the MX records using getmxrr( ):
getmxrr('yahoo.com', $hosts, $weight); for ($i = 0; $i < count($hosts); $i++) { echo "$weight[$i] $hosts[$i]\n"; } 5 mx4.mail.yahoo.com 1 mx2.mail.yahoo.com 1 mx1.mail.yahoo.com
To perform zone transfers, dynamic DNS updates, and more, see PEAR's Net_DNS package.
See Also
Documentation on gethostbyname( ) at http://www.php.net/gethostbyname, gethostbyaddr( ) http://www.php.net/gethostbyaddr, gethostbyname1( ) at http://www.php.net/gethostbyname1, and getmxrr( ) at http://www.php.net/getmxrr; PEAR's Net_DNS package at http://pear.php.net/package-info.php?package=Net_DNS; DNS and BIND by Paul Albitz and Cricket Liu (O'Reilly) .
Checking if a Host Is Alive
You want to ping a host to see if it is still up and accessible from your location.
Use PEAR's Net_Ping package:
require 'Net/Ping.php'; $ping = new Net_Ping; if ($ping->checkhost('www.oreilly.com')) { print 'Reachable'; } else { print 'Unreachable'; } $data = $ping->ping('www.oreilly.com');
The ping program tries to send a message from your machine to another. If everything goes well, you get a series of statistics chronicling the transaction. An error means that ping can't reach the host for some reason.
On error, Net_Ping::checkhost( ) returns false, and Net_Ping::ping( ) returns the constant PING_HOST_NOT_FOUND. If there's a problem running the ping program (because Net_Ping is really just a wrapper for the program), PING_FAILED is returned.
If everything is okay, you receive an array similar to this:
$results = $ping->ping('www.oreilly.com'); foreach($results as $result) { print "$result\n"; } PING www.oreilly.com (184.108.40.206) from 192.168.123.101 : 32(60) bytes of data. 40 bytes from www.oreilly.com (220.127.116.11): icmp_seq=0 ttl=239 time=96.704 msec 40 bytes from www.oreilly.com (220.127.116.11): icmp_seq=1 ttl=239 time=86.567 msec 40 bytes from www.oreilly.com (126.96.36.199): icmp_seq=2 ttl=239 time=86.563 msec 40 bytes from www.oreilly.com (22.214.171.124): icmp_seq=3 ttl=239 time=136.565 msec 40 bytes from www.oreilly.com (126.96.36.199): icmp_seq=4 ttl=239 time=86.627 msec -- - www.oreilly.com ping statistics -- - 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max/mdev = 86.563/98.605/136.565/19.381 ms
Net_Ping doesn't do any parsing of the data to pull apart the information, such as the packet loss percentage or the average round-trip time. However, you can parse it yourself:
$results = $ping->ping('www.oreilly.com'); // grab last line of array; equivalent to non-destructive array_pop( ) // or $results[count($results) - 1] $round_trip = end($results); preg_match_all('#[ /]([.\d]+)#', $round_trip, $times); // pull out the data list($min,$avg,$max,$mdev) = $times[1]; // or print it out foreach($times[1] as $time) { print "$time\n"; } 83.229 91.230 103.223 7.485
This regular expression searches for either a space or a slash. It then captures a sequence of one or more numbers and a decimal point. To avoid escaping /, we use the # nonstandard character as your delimiter.
See Also
PEAR's Net_Ping package at http://pear.php.net/package-info.php?package=Net_Ping.
Getting Information About a Domain Name
You want to look up contact information or other details about a domain name.
Use PEAR's Net_Whois class:
require 'Net/Whois.php'; $server = 'whois.networksolutions.com'; $query = 'example.org'; $data = Net_Whois::query($server, $query);
The Net_Whois::query( ) method returns a large text string whose contents reinforce how hard it can be to parse different Whois results:
Registrant: Internet Assigned Numbers Authority (EXAMPLE2-DOM) 4676 Admiralty Way, Suite 330 Marina del Rey, CA 90292 US Domain Name: EXAMPLE.ORG Administrative Contact, Technical Contact, Billing Contact: Internet Assigned Numbers Authority (IANA) email@example.com 4676 Admiralty Way, Suite 330 Marina del Rey, CA 90292 US 310-823-9358 Fax- 310-823-8649 Record last updated on 07-Jan-2002. Record expires on 01-Sep-2009. Record created on 31-Aug-1995. Database last updated on 6-Apr-2002 02:56:00 EST. Domain servers in listed order: A.IANA-SERVERS.NET 188.8.131.52 B.IANA-SERVERS.NET 18.104.22.168
For instance, if you want to parse out the names and IP addresses of the domain name servers, use this:
preg_match_all('/^\s*([\S]+)\s+([\d.]+)\s*$/m', $data, $dns, PREG_SET_ORDER); foreach ($dns as $server) { print "$server[1] : $server[2]\n"; }
You must set $server to the correct Whois server for a domain to get information about that domain. If you don't know the server to use, query whois.internic.net:
require 'Net/Whois.php'; print Net_Whois::query('whois.internic.net','example.org'); [whois.internic.net] Whois Server Version 1.3 Domain names in the .com, .net, and .org domains can now be registered with many different competing registrars. Go to http://www.internic.net for detailed information. Domain Name: EXAMPLE.ORG Registrar: NETWORK SOLUTIONS, INC. Whois Server: whois.networksolutions.com Referral URL: http://www.networksolutions.com Name Server: A.IANA-SERVERS.NET Name Server: B.IANA-SERVERS.NET Updated Date: 19-aug-2002 >>> Last update of whois database: Wed, 21 Aug 2002 04:56:56 EDT <<< The Registry database contains ONLY .COM, .NET, .ORG, .EDU domains and Registrars.
The "Whois Server:" line says that the correct server to ask for information about example.org is whois.networksolutions.com.
See Also
PEAR's Net_Whois class at http://pear.php.net/package-info.php?package=Net_Whois.


text:
Mother of teen murder suspect admits to obstructing justice
07/11/2013 7:22amA Moab woman has admitted that she lied to Grand County sheriff's deputies during their investigation into the killing of her boyfriend. The woman's 17-year-old son and another teen are accused of killing the man.
Marine Corps offers many diverse job opportunities for recruits
07/11/2013 7:58amEach year, 17,000 young men graduate from Marine Corps Recruit Depot San Diego. After boot camp, they head off for more training in their chosen fields of expertise. Statistics show 99 percent are high school graduates.
Hospital nearly harvests live woman's organs, fined $6,000
07/11/2013 11:10amA woman who was still alive nearly had her organs harvested at a New York Hospital in 2009. The hospital was fined $6,000 for the incident.
The BYU-Utah rivalry will return, so what changed?
07/11/2013 11:28amAfter announcing a year ago the BYU-Utah football rivalry was going to take a two year hiatus, Utah athletic director Chris Hill said this week that the rivalry will return. Why the change?
5 unique Utah splash pads
07/11/2013 12:53pmTemperatures have been record-breaking this summer and many people are looking for the best ways to beat the heat. If you have kids, chances are you need new ideas on how to keep your family cool.
Transformer sparks fire near subdivision
07/11/2013 1:44pmAn exploding transformer started a fire in the Farmington foothills Wednesday night. It was one of several fires that kept crews busy around the state.
Provo man arrested after alleged threats to bomb 3 buildings
07/11/2013 3:21pmA Provo man was charged in federal court with possessing an illegal machine gun. The investigation into Keith Max Pierce began after he allegedly made statements about bombing three buildings in Provo.
Scientists see uptick in pollutants amid Utah and surrounding fires
07/11/2013 4:38pmWildfires in and around Utah are affecting the state's air quality, and as the mountains emerge from the smoke and smog, scientists are looking into how poor the air quality actually is.
Police locate, arrest woman accused of abandoning baby
07/11/2013 4:47pmA woman who allegedly left an infant boy in a stroller alone under a tree was arrested Thursday.
Man in red mask robs SLC Zions Bank; police still searching for suspect
07/11/2013 5:04pmPolice are searching for a man who robbed a Zions Bank while wearing a red mask Thursday morning.
Utah leaders, legislators want movement on immigration reform
07/11/2013 5:33pmU.S. House Republicans, including Utah's delegation, overwhelmingly came down against the proposed overhaul and as Congress reconvenes this week, House Republicans say they're starting over.
Midvale man finds niche in framing exotic bugs
07/11/2013 5:58pmA small store in Midvale is infested with bugs — thousands of them — and the owner wouldn't have it any other way.
Mom trying to find man who helped son with seizure at parade
07/11/2013 6:46pmJaime McKee never got the name of the man who helped her son get to the hospital when he had a seizure July 4, but she'd like to meet him to offer her thanks.
Missing hikers found near Tony Grove
07/11/2013 7:23pmSearch and rescue teams have found the couple that went missing after setting off for a hike. They left for the hike Wednesday morning and didn't return home that night.
SLC judge who allegedly distributed Oxycodone appears in court
07/11/2013 8:11pmA suspended Salt Lake City Justice Court judge appeared in court for the first time Thursday after facing felony drug distribution charges.
Judge allows man who killed wife with car to pursue new trial
07/11/2013 8:52pmA man convicted of killing his wife by striking her with a truck and leaving her on the side of the road can continue his pursuit of a new trial for the time being, a judge ruled Thursday.
Attorney: Officer arrested for stealing pain pills 'not a corrupt cop'
07/11/2013 9:14pmThe attorney for a former West Valley police officer accused of stealing pain pills from a dead man's house said extreme stress and personal issues took their toll.
Farmington residents disgusted by stinky, yellow water
07/11/2013 9:31pmTyler Seamons prepared a bath for his 3-year- old son Wednesday night at their home in Farmington and was surprised to discover the water in the tub was yellow and smelled of sulfur.
Scout leader could face charges for shooting bear at camp
07/11/2013 9:59pmFood, including bars of Snickers, were left out on a picnic table. Even with a crowd of 500 Scouts, the bear didn't move. A Scout leader felt the only option was to shoot it.
Sandy man helps save elderly woman aboard flight to Australia
07/11/2013 10:17pmA Sandy man used his medical training to help save an elderly woman aboard a flight to Australia after she went unconscious.
Lehi woman's wedding ring retrieved from sewer by city crew
07/11/2013 11:59pmWhen a distressed mother called to report her youngest child had flushed her wedding ring down a toilet, Lehi's water department rushed to help.
We're sorry, currently this live video stream is only available inside of Utah or an approved RSL broadcast territory.
We base your location on your IP address. Some providers IP addresses may show your location outside of the state, even though you are physically within the state boundaries. For more information about RSL on KSL, please see our FAQ.

subset: commoncrawl


text:
Due to vendor restrictions this product does not qualify for this offer.
World's Largest Aftermarket Motorcycle Parts and Accessories Superstore!
Input the part number and quantity to add a part directly to your cart.
Due to vendor restrictions this product does not qualify for this offer.
Continue Shopping
J&P Part: 166-2429
Checking availability...
Our customer service has the answer.
Product Color: Gray/Black
Gender: Men's
Material: FreeAir Mesh
Closure Type: Zipper
Design: Velocity
Manufacturer Part Number: 1254-0607
Sold in Units: Each
Warehouse Part Number: 1295156
Waterproof: Waterproof
This product has not yet been reviewed. Be First To Write A Review
Call Us
7 a.m.–9 p.m. CST (Monday-Friday)
8 a.m.–6 p.m. CST (Saturday-Sunday)
Memorial Day: 8 a.m.–6 p.m. CST
4th of July: 8 a.m.–6 p.m. CST
Labor Day: 8 a.m.–6 p.m. CST


text:
PySite is not a CMS in the traditional sense. Rather, you manage the contents of a Web site via a file manager interface, which gives you access to all settings (pages, styles, plugins, etc.). Compose your pages with Jinja templates, and edit your code comfortably with syntax highlighting in the ACE editor. You may write your stylesheets in Sass and let the integrated compiler write CSS files. PySite also contains a facility to manage virtual mailboxes, in case you maintain your own SMTP and IMAP server, e.g. with Postfix and Dovecot.
BitNami Gitorious Stack Native Installer is an easy-to-install distribution of the Gitorious application. It includes pre-configured, ready-to-run versions of Apache and MySQL so users can get a Gitorious installation up and running in minutes after answering a few questions. Windows, Linux, Linux 64, and Mac OS X operating systems are supported. Gitorious provides an Open Source infrastructure for hosting projects which use Git. It also supports projects with wikis, a Web interface for merge requests and code reviews, and activity timelines for projects and developers.


text:
Before 24-hour news channels and social media, it might have been easier to get away with an obtuse remark every now and then. But today, one thoughtless (or thoughtfully abhorrent) comment can get immediately picked up, reported, retweeted, and raged about before the speaker has finished their sentence.
Here are some of the most outrageous words spoken in 2012, and here's to a more civil 2013 ...
The throwaway remarks that unleashed a nation's fury
Yumi Stynes and George Negus made baffling remarks in February on Channel Ten's now-defunct The Circle program after being shown images of Australian soldier and Victoria Cross recipient Ben Roberts-Smith working out in a swimming pool. Smith had gone through IVF with his wife in order to start a family, and had given an interview to Channel Seven's Sunday Night that week.
Stynes: "He's going to dive down to the bottom of the pool to see if his brain is there."
Negus: ''But that sort of bloke, and what if they're not up to it in the sack?"
The two later apologised on air after they, and in particular Stynes, were engulfed in a storm of public criticism and anger.
'Surprisingly' controversial topic of the year
The US presidential election had more than its share of outrageous remarks, but it was minor Republican politicians who really covered themselves in glory.
In August, Republican Senate candidate Todd Akin - when asked if he supported abortion in cases of rape - informed us that, scientifically speaking, pregnancies from rape were actually very rare:
"From what I understand from doctors, [pregnancy from rape] is really rare ... If it's a legitimate rape, the female body has ways to try to shut that whole thing down."
Akin then went on to say that if a rare case of rape pregnancy did occur, he thought the punishment ''ought to be on the rapist and not attacking the child''.
Then in October, Akin's fellow Republican Senate candidate, Richard Mourdock, revealed that while he thought rape was horrible, a pregnancy from a rape was a gift from God:
"Life is that gift from God. And even when life begins in that horrible situation of rape, that it is something that God intended to happen."
Gaffe-prone politician of the year
Republican presidential candidate Mitt Romney had several clangers during the campaign.
In a CNN interview in February: "I'm not concerned about the very poor. We have a safety net there. If it needs a repair, I'll fix it."
At the Iowa State Fair in August, in response to someone in the crowd who said taxes should be raised on corporations: ''Corporations are people, my friend.''
At a closed fundraiser in Florida, leaked in September: ''There are 47 per cent of the people who will vote for the president no matter what ... my job is not to worry about those people.''
And at the second presidential debate in October: ''I went to a number of women's groups and said, 'Can you help us find folks?' and they brought us whole binders full of women." Cue one of 2012's best memes.
Those troublesome female journalists
During Leigh Sales' now-famous interview with Tony Abbott on 7.30 on August 22, in which he said the carbon tax was partly to blame for BHP's decision to put its Olympic Dam project on hold - despite BHP stating that it wasn't - the Opposition Leader admitted he hadn't read BHP's statement on the project. Sales asked him if he thought that ''the nature of politics allows politicians to be a little bit free with the facts in their statements just as part of the game of politics?''
How dare she, said Liberal Party strategist Grahame Morris, saying on ABC radio:
''Leigh Sales can be a real cow sometimes.''
Sales took to Twitter for her response.
''I'd rather be a cow than a dinosaur.''
Then in November, former Wallaby David Campese attacked Sydney Morning Herald sports journalist Georgina Robinson on Twitter:
"Why does the SMH get a girl to write about rugby. Growden who was a great jornio (sic) and now we have someone who has no idea about the game...!''
This comment drew plenty of ire, further irking Campese:
''Sometimes it is good to see some people react to thing you say. Please relax and see the light side of life. All press are the same.''
The text messages we wish to unsee
Choose from a number of those sent by former Speaker Peter Slipper to his then-staffer James Ashby.
I'll have what she's having
Workplace Relations Minister Bill Shorten was certainly loyal when asked on ABC in April whether he thought Peter Slipper should be allowed to return as Speaker.
"I haven't seen what [Julia Gillard] said but let me say, I support what it is that she said. I support what she said. My view is what the prime minister's view is."
Most ridiculed celebrity remark of the year
This has to be awarded to the actress Melissa George, best known for her role as Sam Hunter in the British TV series The Hunted*.
George said she was sick of the Aussie media's incessant referrals to a certain role she played 20 years ago, and it was making her too stressed to come back to Australia:
''I'd rather be having a croissant and a little espresso in Paris or walking my French bulldog in New York City.''
*She was also once on Home and Away.
Most exaggerated simile of the year
Clive Palmer didn't receive an invitation to the Prime Minister's economic forum in June, but he didn't want to go anyway:
''Unfortunately the forum will be a predetermined meeting like they had in Stalin's Russia.''
Most outrageous response to tragedy
After the Newtown massacre in December, the US National Rifle Association announced it was ready to ''offer meaningful contributions to help make sure this never happens again'', sparking a sliver of hope that the lobby group was prepared to take a small step towards tighter gun control. Not so. At the NRA's press conference to respond to the shooting, NRA executive vice president Wayne LaPierre announced:
''The only thing that stops a bad guy with a gun is a good guy with a gun.''
''I call on Congress today, to act immediately to appropriate whatever is necessary to put armed police officers in every single school in this nation.''
Most controversial headline of the year
It has to go to Time magazine for its infamous 'Are you mom enough?' cover.
Most regrettable remark of the year
Michael Christian, of 2Day FM:
''Let's give this hospital a call and see if we can get Kate Middleton or maybe even Prince Wills on the phone tonight. So the number is going in ... oh Jeez, I hope this happens.''
The human media storm of the year
In the end, though, there is one out and out winner. Alan Jones seemingly couldn't open his mouth this year without emitting obtuse and frequently sexist noise. In August he raged at news the federal government would spend $320 million to promote gender equality in the Pacific region. The last thing we need is more women in positions of power, he reckoned:
"[Prime Minister Julia Gillard] said that we know societies only reach their full potential if women are politically participating. Women are destroying the joint - Christine Nixon in Melbourne, Clover Moore here. Honestly,'' he puffed on-air.
But Jones was just getting warmed up. The next month, he spoke at a dinner at the Sydney University Liberal Club a few weeks after Ms Gillard's father had died.
"Every person in the caucus of the Labor Party knows that Julia Gillard is a liar, everybody. I will come to that in a moment. The old man recently died a few weeks ago of shame. To think that he has a daughter who told lies every time she stood for Parliament,'' he said.
Jones apologised, but the person he felt really bad for was himself. Mercedes-Benz asked for their sponsored car back, so he called a Merc exec a ''gutless wonder'' on-air. Jones also claimed to be a victim of cyberbullying after an online campaign imploring businesses to drop their support of his 2GB program.
And here are some of the other most newsworthy quotes of 2012
"If it is corruption, then it is corruption on a scale probably unexceeded since the days of the Rum Corps."
- Geoffrey Watson SC, counsel assisting the Independent Commission Against Corruption involving former NSW Labor ministers Eddie Obeid and Ian McDonald.
"It's happening faster than we had thought. This is not good news."
- Australian climate scientist, Professor Andy Pitman of UNSW, talking about melting permafrost in November.
I'm safely on the surface of Mars. GALE CRATER I AM IN YOU!!! #MSL
- The Mars Curiosity Rover tweets after landing.
"There comes a point in every man's life when he has to say, 'Enough is enough.' For me, that time is now."
- Lance Armstrong after dropping his fight against doping charges, which led to him being banned from cycling for life by the US Anti-Doping Agency, and losing his seven Tour de France titles.
''I'm now a legend, I'm the greatest athlete to live.''
- Usain Bolt after winning gold in the 100m and 200m at the London Olympics.
"By the end of my second term, we will have the first permanent base on the moon, and it will be American."
- US Republican presidential candidate Newt Gingrich gets ahead of himself in January.
"Under current law, on January 1st, 2013, there is going to be a massive fiscal cliff of large spending cuts and tax increases."
- US Federal Reserve chairman Ben Bernanke in February.
''So I've got Mr Obama sitting here. And he's ... I was just gonna ask him a couple of questions.''
- Clint Eastwood speaks to an empty chair at the Republican National Convention in August.
"If you were successful, somebody along the line gave you some help. There was a great teacher somewhere in your life. Somebody helped to create this unbelievable American system that we have that allowed you to thrive. Somebody invested in roads and bridges. If you've got a business — you didn't build that."
- US President Barack Obama on the campaign trail in July.
"Another day of shame for a government that should already have died of shame."
- Tony Abbott in the House of Representatives on October 9.
''I say to the Leader of the Opposition I will not be lectured about sexism and misogyny by this man. I will not. And the Government will not be lectured about sexism and misogyny by this man. Not now, not ever.''
- Julia Gillard in the House of Representatives on October 9.


text:
SP Business School
Designing Business. Defining Tomorrow
7 Sep 2013 – that was the date of the Parents' Forum, organised by SP. Talks and Q+A sessions at SP Auditorium enlightened parents and their children of SP's academic programmes and the great possibilities/aspirations and potentials paved by the "SP journey". The SP ACERS, SB Ambassadors (our dedicated student hosts) welcomed about 500 guests, with warm hearts and enthusiasm.
Buses ferried our guests for tours to various academic schools and of course, at the Business School, we played host to about 133 parents/visitors. SB Tour Segment gave interesting insights and experience as we showcased our course specific/dedicated facilities including our UOB-SP Dealing Centre, Human Resource and Design Studios and Tourism/Hospitality Hub.
SB Director's cheerful welcome address, SB hospitality and our SB branding (conveyed vividly by our video clips) definitely brightened our visitors' day !
Truly, it was "Team SP and SB" at work!
On 14th July, SP Business School hosted its annual Meet the Parents session for Year One students.
Business School Leaders complete 4 days 3 Nights Leadership Camp
The AAC is an annual competition organised by Nanyang Business School Auditing and Assurance Team (NAAT) which aims to develop interest in the auditing and accounting field and also to create awareness on the latest audit and accounting issues.
ICAEW South East Asia Business Challenge 2017: SP Accountancy awarded the Most Collaborative Team Award.
The 4D3N personal leadership camp from 5 to 8 June 2017 at Kota Tinggi, Malaysia, was attended by 50 students from ABE, SD and SB, accompanied by lecturers and facilitated by aspen3. The 7 habits were reinforced and applied via indoor and outdoor activities, workshops, treks and kayaking. Students had a wonderful time of learning and bonding, culminating in a campfire on the last night.
On 3 June 2017, our SP Accountancy students competed in the competition against other university and polytechnic teams. Our students emerged as 2nd runner up (behind SMU and SUSS). We were the only polytechnic that won an award during the competition.
The SB Times, which is the editorial arm of the SB Club, wishes you a happy start to Semester 1!
The SP Convention Centre played host to the SB Achievers' Function on 2 June 2017, an event to celebrate the academic and/or CCA achievements of SB students in AY2016/2017 as well as to honour some exceptional lecturers.
Over 50 industry guests were invited to the School of Business (SB) from Singapore Polytechnic to assess presentations by business students for their final year projects.
There is so much to say about SPELL, as it is such a unique and one-of-a-kind retail shop run entirely by Singapore Polytechnic students.
Final year Diploma in Business Administration (Marketing Management options) students were filled with a bewildering array of emotions on 10 February 2017.
Two DAC students, Cheryl Lai and Javin Chan Jun Wei, emerged as the first-runner up in the University of Newcastle (UON) Singapore Business Plan competition 2016 on 3 September 2016.
Students from DBA, DAC and DEEE taking the Fundamentals of Marketing module in AY 20162017 Semester 1 got to work on an industry project based on the Gatsby Moving Rubber brand.
12 August 2016 - It was a day of many emotions for 3 teams from the final year Diploma in Business Administration (Marketing Management) option students.
On the 13th of July 2016, CPA Australia and Binder Dijker Otte (BDO) specially came down to Singapore Polytechnic to give DAC Students a talk.
Kristal, a recent graduate of the Diploma in Business Innovation and Design (DBID) is currently pursuing a Fashion Marketing undergraduate degree at London College of Fashion – a constituent college of the University of the Arts London.
More than 600 guests including lecturers, students and their families were present to honour outstanding students for their diverse achievements in Academic Year 2015/2016.
Meet Jocelyn Tan- a girl on a mission to transform the world with a smile. Jocelyn graduated from the Diploma in Business Innovation and Design in April 2016.
The National Economics and Financial Management Challenge (NEFMC) is an annual competition organised by the NUS Economics Society in collaboration with MoneySense.
The Finals of the SP Business School – POSB Marketing Plan Competition 2015 was held on 12 August, 6 to 9 pm at MLT 8. Close to 80 guests, staff and students attended the event.
Keriann was part of the pioneer batch of Business Innovation and Design students in SP Business School. Her first steps into DBID were tentative ones, not knowing what to expect of her three years.
New programme will offer interns opportunity to work full-time at higher position and pay scale.
The tour was a great learning platform for the Hospitality Mid-Management Internship Programme (HMMIP) as they will start their one-year internship in the new academic year. The Hospitality Mid-Management Internship Programme (HMMIP) provides a fast-tracked career path to selected DTRM students.
Not a single poly student had ever been certified by the Institute of Banking and Finance (IBF) while they are still studying as polytechnic students. But the three 19 year-old SP-DFI students proved the well-meaning doubters wrong.
An Interview with Jacqueline Melissa Hongadi
Diploma in Human Resource Management with Psychology (2008-2011)
Bachelor of Arts in Sociology (Hons I) (2015).
An interview with our DIB Gold Medallist(Broadway Industrial Group) Mr Emmanuel Ho.
In SP Business School, we have an impressive group with expertise in areas including Entrepreneurship, Human Resource, Marketing, Retail, Advertising and Public Relations. Indeed, the local newspapers and media have always actively seek our lecturers for their professional perspectives, views and opinions. Wouldn't it be cool to be taught by lecturers who are in touch with the pulse of the industry !
Roshelle Tan Wei Xi and Leong Jie Jun from the Diploma in Tourism and Resort Management are the proud recipients of prestigious scholarships to local universities.
The annual UOB Kay Hian Scholarship presentation ceremony took place on 13th Nov 2014. Fifteen excited scholars made their way to UOB Kay Hian's office at Anthony Road.
In line with the Government's call for more young people in Singapore to be involved in entrepreneurship, SP Business School (SB) is pleased to present the 17th edition of our Young Entrepreneurship Challenge, YES 2015, in a new format.
30th October 2014 11:00 – 4:00 PM T19 Ground Floor & 1st Floor Podium. Gather information that will aid you in planning your career.
SP Business School hosted close to 300 Secondary 3 students at the 4th run of ime@nbusiness held on 15 October. More than 7 schools responded ...
Promising and outstanding DHRMP students who excel within and beyond the classroom are able to receive recognition through prestigious (bond-free) scholarships offered by two leading organisations - Cerebos Pacific Pte Ltd and Hays Specialist Recruitment Pte Ltd.
On 31 October 2014, about 140 students from the Diploma in Human Resource Management with Psychology (DHRMP) participated in a bonding event. Called the "Magical Night" it was organised by our very own DHRMP Student Chapter.
These were the comments given by Year 3 SP students on our Peer Coaching Programme – "Interviews LIVE", a second time collaboration between SP Business School and the Student Service Centre.
13 August 2014….it's the Finals of the SP Business School - Mott's Snapple International Marketing Plan Competition.
To celebrate with the first graduating class of Diploma in Business Practice (Business Management), the Couse Management Team organised a farewell dinner buffet on 11 August 2014.
40 students from SP's Diploma in Human Resource Management with Psychology (DHRMP) embarked on an exciting study trip to Hong Kong from 9-14 September 2013.
For the third year, the Ministry of National Development (MND) conferred on SP Diploma in Business Innovation and Design (DBID) students a 3 year scholarship valued at more than $15,000.
On July 23rd 2014, students from the Diploma in Business Innovation and Design continued their conversation with innovative industry leaders.
On 15th July 2014, close to 90 students from the Diploma in Business Administration and the Diploma in Engineering with Business attended a Talk at MLT 11 on "Branding Strategies of Etude House Products in Singapore".
Congratulations to the following 2014 Scholarship Recipients...
In recent years, there has been increasing concern about the values and emotional health of Singaporeans, particularly in the younger generation...
On 16th January 2014, Year 3 students of the Diploma in Tourism and Resort Management had an exclusive opportunity to visit the Conrad Centennial Singapore Hotel.
Glitz and glamour was the 1920s. The DTRM Chapter brought back the Roaring Twenties with a grand theme influenced by a well-known book and movie adaptation, The Great Gatsby, for this year's Graduation Night.
Teams pit themselves against each other in an exciting real-time, web-based business game. During the course of the game, participants will have to make strategic decisions based on fluctuating market prices and uncertain market conditions.
In line with the Government's call for more young people in Singapore to be involved in entrepreneurship, SP Business School (SB) is pleased to present the 16th edition of our Young Entrepreneurship Challenge, YES 2014, in a new format.
During my course of study in Singapore Polytechnic (SP), the Diploma in Business Administration (DBA) has given me numerous opportunities and has allowed me to challenge myself holistically
I was from the Diploma in Business Administration, majored in Marketing and Retail options in Year 3.
Two SP Business School teams, "VSA" and "District 3" from the Diploma in Human Resource Management with Psychology (DHRMP) emerged FIRST and THIRD placings (Polytechnic / University Category) of the Singapore HR Challenge 2014 which was held on Sat, 15 February 2014 at MLT 12.
Our congratulations to DHRMP students who were recognised for their efforts in various poly-wide activities!
SP Business School proudly hosted the 5th Annual Entrepreneurship Bazaar from 6-7 February 2014 at the Auditorium. More than 40 stalls managed by nearly 200 students from SP, Fairfield Methodist Secondary School and Outram Secondary School were set up.
12 February 2014 was a big day for the final year Diploma in Business Administration (Marketing Management option) students – it was the finals of the Marketing Plan Competition 2014.
Mrs Pamela Wigglesworth, Managing Director of Experiential Pte Ltd, presented a talk on the 27th of Jan 2014, entitled 'Designing an Interactive Multi-touch Marketing Campaign' which focused on various marketing strategies and the use of social media to engage consumers.
SP Business School hosted 59 students from the Direct Polytechnic Admission (DPA) programme on Friday 7 February 2014.
Year 2 students from the Diploma in Human Resource Management with Psychology (DHRMP) conducted mock interviews, as well as, gave constructive feedback to 28 Year 3 SP students. Called the Peer Coaching programme – "Interviews Live", it was a first time collaboration between SP Business School and the Student Service Centre.
Besides bonding through activities, SB staff and students set the record for formation of the largest orange circle.
SP Business School hosted about 230 Secondary 3 students at its third run of i me@n Business on 16 October. The half day event was filled with both course-related activities as well as fun hands-on activities.
7 August 2013, 3pm....The moment of truth for the final year Diploma in Business Administration (Marketing Management option) students arrived when after months of hard work, the students pitched their marketing plan proposals to Network for Electronic Transfers Singapore Pte Ltd (NETS).
7 Sep 2013 – that was the date of the Parents' Forum, organised by SP. Talks and Q+A sessions at SP Auditorium enlightened parents and their children of SP's academic programmes and the great possibilities/aspirations and potentials paved by the "SP journey".
Participating in the SP NETS Marketing competition has given me invaluable insights and priceless opportunities. I have gained a real-life, authentic working experience that has benefitted and enriched me greatly.
The Singapore Polytechnic Convention Centre was bustling with excitement when 223 secondary school students island wide and 86 Diploma in Business Administration and Diploma in Business with Engineering 1st year students came together to participate in the 15th Young Entrepreneurship Challenge (YES) hosted by SP Business School on 4th and 5th June 2013.
Our heartiest congratulations to Dennis Teo Jun Wei, our DAC Alumni, for being awarded the SPRING-GREENPAC Singapore Executive Development Scholarship 2013.
DATE: 10 July 2013, Wed, 3:15 – 5pm
Venue: MLT8, SINGAPORE POLYTECHNIC
The Direct Polytechnic Admission (DPA) Programme in Singapore Polytechnic (SP) allows Singapore Polytechnic flexibility to select students on criteria other than GCE 'O'-Level results, thus allowing a wider range of talents to be recognised.
Within the various SP Schools, there's a strong presence of students with siblings in the same school. They have sat through the same classes, eaten in the same food courts and studied under
the same lecturers. Some make the choice to study here together, while others tell all they know to their younger siblings and let them make their own choice.
The annual SP Business School Entrepreneur Bazaar was held on the 6th & 7th February, 2013. This annual event is an opportunity for many SP students to showcase their selling skills at the hub of Singapore Polytechnic.
Everyone is a winner at the SP Business School - Sentosa 4D Magix Marketing Plan Competition 2013.
Seven years ago, to meet a rising demand for local entrepreneurs, Singapore Polytechnic's (SP) Business School introduced the Entrepreneurship Option to third-year students taking the Diploma in Business Administration programme.
SP Business School hosted 23 students from the Direct Polytechnic Admission (DPA) programme on Wednesday 6 March for a few hours of fun and learning.
The committee members of SB Entrepreneurial Leadership Club (ELC) held their finale event – Bowling Fiesta at West Bowl, Clementi on 16 January 2013.
Congratulations to our Diploma in Tourism & Resort Management graduate Tony Yeoh, who is the proud recipient of the SPRING Executive Development Scholarship!
Lim Xing Yi and Rachel Soon Mun Ee, both students undertaking the Diploma in Business Administration (DBA) are the proud recipients of the Dairy Farm Scholarships which are merit-based awards awarded by the Dairy Farm Singapore Group
In Dec 2012, Gene embarked on the US-ASEAN Young Leaders Summit 2012 that was held in Jakarta, Indonesia and initiated by Secretary Clinton of the United States.
Students flocked to the SB Career Fair 2012 to meet with prospective employers and listened to talks on career opportunities available to them after graduation.
As part of the SB Community Service Day, 30 staff and students from SP Business School volunteered at the Highpoint Community Services Association (HCSA).
The second run of SP Business School's event, ime@nbusiness, was held on Tuesday 16 October.
Contributed by: Vinni Goh Mei Xiang, Ng Zhen Yuan, Maybelline Lim & Marcus Keck (DBF year 2)
KHOO KIAN KOON of DTRM/FT/3A/03 shares his insights
Listen to distinguished guest speakers from industry offering advice on Career Planning and more!
Two teams of SP students, one from the Business School and the other from the School of
Design, were given the opportunity to work on a Design Thinking project sponsored by OCBC Bank, the leading local bank.
Singapore International Water Week/ World Citites Summit/ Clean Enviro Summit 2012
By: Melanie Tay DTRM/FT/2A/01
1st August 2012 - This was the day when three teams from the 3rd year cohort of the Diploma in Business Administration, specialising in Marketing Management, emerged as finalists in the SP Business School - Bugis Street Marketing Competition 2012.
Our students at SP Business School are certainly going places!
At SP Business School, our lecturers go the extra mile. We are proud to feature two lecturers from SP Business School, Han Lih Lih and Ken Kwan, who are the proud recipients of Koh Boon Hwee award.
Dominic Chew graduated from SP Business School with the Diploma in Business Administration (Marketing) with Merit in 1993. His foundation in SP gave him the edge to graduate from the Royal Melbourne Institute of Technology University with a Bachelor of Business with Distinction, and from the University of Strathclyde with a post-graduate Diploma in International Marketing.
Our very own DIB students participated for the first time in the prestigious Future China Global Forum 2012 on July 9th and 10th. This year, it was held at Shangri La Hotel, Singapore.
On 21st June, a group of secondary school teachers spent the afternoon at SP Business School to learn the art and science of forex trading.
The Youth Entrepreneurs Competition aims to instill lateral thinking in our young and to turn challenges into opportunities. Our SP team emerged as winner of "Best in Digital Marketing & Social Media" and "1st Runner Up" for overall.
The Singapore Polytechnic Business School has hosted the 14th Young Entrepreneurship Challenge (YES) 2012. This year's theme was Designing Business for Social Good.
SP Business School hosted 100 secondary school students to an SP Experience (SPX) on Tuesday 5 June where students had a choice two workshops: EQ and Psychology and the workshop on Hospitality and Service Quality.
Mr Yuliyanto, graduated with first-class honours and has also been nominated as a valedictorian of NTU's Nanyang Business School despite once being rejected by 4 polys.
During the March holidays, our students embarked on a journey to Ho Chi Minh, Vietnam and collaborated with four Vietnamese colleges for their Overseas Social Innovation Project (OSIP).
Excitement filled the hearts of the twenty of us from SP Business School who were ready for our Overseas Internship Training Program (OITP) at Suzhou and Shanghai in March-April 2012.
Six Seconds introduced the first EQ Certification for tertiary education in the SEA Region on 23 March 2012 with a pioneering program in the Singapore Polytechnic Business School.
About 130 students and guests attended the Finals of the AirAsia Marketing Plan Competition 2012
A group of about 60 students from Diploma in Accountancy gathered together on 1st February 2012 to celebrate the completion of their yearlong project.
SP Business School team, "Joy", comprising 4 students from DHRMP emerged First Runner-Up (Polytechnic category) at the Singapore HR Challenge 2012.