1.

<?php
require_once "Mail.php"; $from = "luckyeggs<fuping304@163.com>";
$to = "cheking<fuping304@163.com>";
//$to = "cheking<394276418@qq.com>";
$subject = "hello!";
$body = "12312"; /*********ʹÓÃÒÔÏÂÃû³ÆsslЭÒé·¢ËÍ***********/
//$host = "ssl://smtp.163.com";
//$port = "465"; /*********ʹÓÃÒÔÏÂÃû³Æ·ÇsslЭÒé·¢ËÍ***********/
$host = "smtp.163.com";
$port = "25";
$username = "fuping304";
$password = ""; $headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = @Mail::factory('smtp',
array ('host' => $host,
'port' => $port,
'auth' => true,
'username' => $username,
'password' => $password)); $mail = @$smtp->send($to, $headers, $body); if (@PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>Message successfully sent!</p>");
}
?>

2.httprequest down

$target = "aa.txt";
$url = "http://www.baidu.com/"; require_once 'installer/HTTPClient.inc';
$c = new HTTPClient();
$req = new HTTPRequest();
$req->setURL($url);
// if ($from !== null)
// $req->downloadRange($from, $to);
$responses = $c->send($req);
$resp = $responses[count($responses)-1];
if ($resp->getStatus() < 200 || $resp->getStatus() >= 300)
throw new Exception("Error downloading file, server response: ".$resp->getStatus()." ".$resp->getStatusMessage());
if ($target == null) return $resp->getBody();
$f = fopen($target,"a");
fwrite($f,$resp->getBody());
fclose($f); die("OK");

https://github.com/passerellesnumeriques/Students-Database/tree/7a7ce9f76670d166413a4a96999d9e3b8b58ead0

第5月第15天 php email的更多相关文章

  1. 第25月第15天 udacity cs253

    1.cs253 https://classroom.udacity.com/courses/cs253 webapp2 Install WebOb, Paste and webapp2¶ We nee ...

  2. 第3月第15天 afconvert lame

    1. //CAF 转换成MP3 (可以) afconvert -f mp4f -d aac -b 128000 /Users/amarishuyi/Desktop/sound1.caf/Users/a ...

  3. 第31月第15天 -fembed-bitcode

    1. 确保打包的时候使用的是fembed-bitcode, 而不是fembed-bitcode-maker fembed-bitcode-maker:只是简单的标记一下在archive出来的二进制中b ...

  4. 第16月第15天 glut

    1. https://tokoik.github.io/opengl/libglut.html https://github.com/wistaria/wxtest/tree/master/C htt ...

  5. 第12月第15天 mysqlx boost reswift

    1. INSTALL PLUGIN mysqlx SONAME 'mysqlx.so' https://yq.aliyun.com/articles/38288 2. boost boost::sha ...

  6. 第9月第15天 设计模式 adapter mvc

    1. 有一道iOS面试题,iOS中都有什么设计模式?很少有答案说包括adapter. gof 书中adapter模式有以下内容: 实现: ... b ) 使 用 代 理 对 象 在这种方法中, T r ...

  7. 第8月第15天 app支持后台播放

    1. AVAudioSession *audioSession = [AVAudioSession sharedInstance]; //默认情况下扬声器播放 [audioSession setCat ...

  8. Apache commons email 使用过程中遇到的问题

    apache-commons-email是对mail的一个封装,所以使用起来确实是很方便.特别的,官网上的tutorial也是极其的简单.但是我也仍然是遇到了没有解决的问题. jar包的添加 mail ...

  9. 15分钟在笔记本上搭建 Kubernetes + Istio开发环境

    11月13~15日,KubeCon 上海大会召开,云原生是这个秋天最火热的技术.很多同学来问如何上手 Kubernetes和Istio 服务网格开发.本文将帮助你利用Docker CE桌面版,15分钟 ...

随机推荐

  1. Go语言实现数据结构(一)单链表

    1.基本释义 2.结构体设计 3.基本方法设计 4.Main函数测试 1. 基本释义 线性表包含两种存储方法:顺序存储结构和链式存储结构,其中顺序表的缺点是不便插入与删除数据:接下来我们重点实现基于G ...

  2. 实验吧ctf题库web题wp

    经历了学校的校赛,一度自闭,被大佬们刺激的要奋发图强. 1.后台登录 链接: http://ctf5.shiyanbar.com/web/houtai/ffifdyop.php 打开题目首先查看源码, ...

  3. LeetCode 617. Merge Two Binary Trees合并二叉树 (C++)

    题目: Given two binary trees and imagine that when you put one of them to cover the other, some nodes ...

  4. C# 词频统计 东北师范大学 软件项目管理 第一次作业

    一.作为杨老师的学生第一次听杨老师讲课,印象最深的就是:工程中所有步骤之间是乘法,如果任何一步为0,工程就做不出来了.以前所有老师讲到的都是不要太在乎结果,努力的过程很重要,但是这在软件工程中不合适了 ...

  5. NS2安装过程中环境变量设置的问题(ns-2.35)

    nam: Can't find a usable tk.tcl in the following directories: */ns-allinone-2.35/tcl8.5.10/library/t ...

  6. Zero-shot learning(零样本学习)

    一.介绍 在传统的分类模型中,为了解决多分类问题(例如三个类别:猫.狗和猪),就需要提供大量的猫.狗和猪的图片用以模型训练,然后给定一张新的图片,就能判定属于猫.狗或猪的其中哪一类.但是对于之前训练图 ...

  7. grunt入门讲解1:grunt的基本概念和使用

    Grunt和 Grunt 插件是通过 npm 安装并管理的,npm是 Node.js 的包管理器. Grunt 0.4.x 必须配合Node.js >= 0.8.0版本使用.老版本的 Node. ...

  8. Beta冲刺——day5

    Beta冲刺--day5 作业链接 Beta冲刺随笔集 github地址 团队成员 031602636 许舒玲(队长) 031602237 吴杰婷 031602220 雷博浩 031602134 王龙 ...

  9. Ubuntu16解锁root

    administrator@rgqancy:~$ sudo passwd -u root [sudo] administrator 的密码: 对不起,请重试. [sudo] administrator ...

  10. 浅谈|WEB 服务器 -- Caddy

    浅谈|WEB 服务器 -- Caddy 2018年03月28日 12:38:00 yori_chen 阅读数:1490 标签: caddyserverwebhttps反向代理 更多 个人分类: ser ...