易截截图软件、单文件、免安装、纯绿色、仅160KB

用PHP实现飞信api接口发飞信短信

不过这个不能和飞信客户端同时登录,二者只能登一个,只要代码在dw里打开,客户端就掉了呵呵~~~
<?php
/*
* Created on 2010-4-18
* MiaoPengFei
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
$data["username"] = ;//这里填自己的手机号
$data["password"] = "";//这里填飞信的密码
$data["sendto"] = ;//这里填收信人的号码
$data["message"] = "没事,这是我自己编的php代码,发的短信哈哈!";//这里填飞信短信内容
$curl = new Curl_Class();
$result = @$curl->post("http://sms.api.bz/fetion.php", $data);
echo $result; //返回信息默认为UTF-8编码的汉字,如果你的页面编码为gb2312,请使用下行语句输出返回信息。
//echo iconv("UTF-8", "GBK", $result);
//curl类
class Curl_Class
{
function Curl_Class()
{
return true;
}
function execute($method, $url, $fields = '', $userAgent = '', $httpHeaders = '', $username = '', $password = '')
{
$ch = Curl_Class::create();
if (false === $ch)
{
return false;
}
if (is_string($url) && strlen($url))
{
$ret = curl_setopt($ch, CURLOPT_URL, $url);
}
else
{
return false;
}
//是否显示头部信息
curl_setopt($ch, CURLOPT_HEADER, false);
//
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
if ($username != '')
{
curl_setopt($ch, CURLOPT_USERPWD, $username . ':' . $password);
}
$method = strtolower($method);
if ('post' == $method)
{
curl_setopt($ch, CURLOPT_POST, true);
if (is_array($fields))
{
$sets = array();
foreach ($fields AS $key => $val)
{
$sets[] = $key . '=' . urlencode($val);
}
$fields = implode('&',$sets);
}
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
}
else if ('put' == $method)
{
curl_setopt($ch, CURLOPT_PUT, true);
}
//curl_setopt($ch, CURLOPT_PRO


相关文档:

php获取form表单中name相同的表单项

原文地址:http://hi.baidu.com/pengpeng5047/blog/item/c3f3b003d0452a034bfb519f.html
比如下面的表单:
/*form.php*/
<form action="getform.php" method="post">
<table border="1">
<tr>
<th>姓名</th>
<th>学号</th>
</tr>
<tr>
<td>张三< ......

[zz]一个超级简单的php投票系统,不使用数据库

本文转自我的博客:(my.unix-center.net/~xiaoshe)
http://my.unix-center.net/~xiaoshe/2010/04/19/%E4%B8%80%E4%B8%AA%E8%B6%85%E7%BA%A7%E7%AE%80%E5%8D%95%E7%9A%84php%E6%8A%95%E7%A5%A8%E7%B3%BB%E7%BB%9F%EF%BC%8C%E4%B8%8D%E4%BD%BF%E7%94%A8%E6%95%B0%E6%8D%AE%E5%BA%93/
从网上发现的一个超级简单的基于php的投 ......

PHP 并发控制样例(转)

值得参考一下该程序设计的思路:
[文章作者:张宴 本文版本:v1.0 最后修改:2007.11.16 转载请注明出处:http://blog.s135.com]
  最近遇到一个问题,Linux下的PHP命令行程序作为守护进程,需要从队列文件中读一行数据,通过TCP协议发送给外地的接收服务器,再读下一行数据,再发送。当本地与外地的网络状况不好时,有 ......

PHP学习笔记

// 连接两个字符串
<?php
    $txt1 = "Hello";
    $txt2 = "PHP";
    echo $txt1." ".$txt2;
?>
// 取得字符串中的字符数
<?php
    $txt1 = "Abc";
    echo strlen($txt1);
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号