Archive for May, 2008
Using sockets in PHP : Get articles from Usenet
http://www.phpbuilder.net/columns/armel20010427.php3
PHP can open sockets on remote or local hosts. Here is a hands-on example of using such a socket: getting connected to a Usenet News Server, talking to this server, and downloading some articles for a precise newsgroup.
Opening a socket in PHP
Sockets are opened using fsockopen(). This function is both available in PHP3 and PHP4. [...]
Send Email from your GMAIL account using java
?View Code JAVApackage com.util.mail;
import java.security.Security;
import java.util.Date;
import java.util.Properties;
import javax.mail.Authenticator;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import org.apache.log4j.Logger;
public static final void sendMail(String to, String title, String content) {
try {
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
final String SSL_FACTORY = [...]
