conn.php文件
代码如下 | 复制代码 |
<html> var geturl="conn.php?q="+str </script> |
代码如下 | 复制代码 |
<?php if (strlen($q) > 0) ?> |
数据库
drop database if exists `xin`;
create database `xin` /*!40100 default character set utf8 */;
use `xin`;
create table `message` (
`id` int(11) not null auto_increment,
`username` varchar(20) default null,
primary key (`id`)
) engine=innodb auto_increment=2 default charset=utf8
//###########################################################
//
// for questions and comments
// roland (alias -=: vlieg :=-)
// icq #78354631
// mail: vlieg@atoomnet.net
//
// nb: this script won't work on free hosting pages, because of the secure mode!
// nb: you must have registered your icq# at http://web.icq.com/sms/login/ in order for this script to work
//###########################################################
$htmlreply="";
$post ="post http://web.icq.com/karma/dologin/1,,,00.html http/1.0
accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
referer: http://web.icq.com/sms/login/1,,,00.html
accept-language: nl
content-type: application/x-www-form-urlencoded
accept-encoding: gzip, deflate
user-agent: mozilla/4.0 (compatible; msie 5.0; windows 98; digext)
host: web.icq.com
content-length: ".$contentlength."
proxy-connection: keep-alive
pragma: no-cache
cookie: uin=".$uin."; sms_country=".$prefix."; karmaservice1=yes; uin=".$uin."; sms_country=".$prefix."; karmaservice1=yes
uservice=1&ulogin=".$uin."&upassword=".$passw."&x=0&y=0";
$remote = fsockopen("web.icq.com", 80, &$errno, &$errstr, 30);
global $remote;
global $post;
fputs($remote, $post);
while (!feof($remote)) { $htmlreply.=fgets($remote,120); }
//uncomment for output: echo "".htmlspecialchars($htmlreply)."";
fclose($remote);
//****************************************************************//persoonlijke cookie uit de inlogpage halen
// en: fetch personal cookie from login page
$splited = split(" ",$htmlreply);
$cookies = $splited[3];
$cookies = str_replace("set-cookie: karmalogin=","",$cookies);
$cookies = str_replace("; path=/","",$cookies);
$cookies = str_replace(" ","",$cookies);
//uncomment voor output: echo $cookies;
if (strlen($prefix) == 2) { $contentprefix = ' '.$prefix; } else { $contentprefix = $prefix; }
$charcount = (160-strlen($message));
$contentlength= ( 1561+
strlen($message)+
strlen($charcount)+
strlen($phonenumber)+
strlen($prefix)
);
//****************************************************************//verzendpagina openen met de opgehaalde cookie
// en: open send page with fetched cookie
$htmlreply="";
$post ='post http://web.icq.com/sms/send_history/1,,,00.html http/1.0
accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
referer: http://web.icq.com/sms/send_session/1,,,00.html?prefix=+'.$prefix.'&carrier=&tophone='.$phonenumber.'
accept-language: nl
content-type: multipart/form-data; boundary=---------------------------7d12442eab4
accept-encoding: gzip, deflate
user-agent: mozilla/4.0 (compatible; msie 5.0; windows 98; digext)
host: web.icq.com
content-length: '.$contentlength.'
proxy-connection: keep-alive
pragma: no-cache
cookie: uin='.$uin.'; sms_country='.$prefix.'; karmaservice1=yes; karmalogin='.$cookies.'; uin='.$uin.'; sms_country='.$prefix.'; karmaservice1=yes; karmalogin='.$cookies.'
-----------------------------7d12442eab4
content-disposition: form-data; name="carrier"
-----------------------------7d12442eab4
content-disposition: form-data; name="prefix"
'.$contentprefix.'
-----------------------------7d12442eab4
content-disposition: form-data; name="tophone"
'.$phonenumber.'
-----------------------------7d12442eab4
content-disposition: form-data; name="usession"
1
-----------------------------7d12442eab4
content-disposition: form-data; name="ureply"
-----------------------------7d12442eab4
content-disposition: form-data; name="ulastid"
-----------------------------7d12442eab4
content-disposition: form-data; name="usend"
1
-----------------------------7d12442eab4
content-disposition: form-data; name="unextid"
-----------------------------7d12442eab4
content-disposition: form-data; name="uhistorycounter"
1
-----------------------------7d12442eab4
content-disposition: form-data; name="count"
0
-----------------------------7d12442eab4
content-disposition: form-data; name="usubmitcount"
0
-----------------------------7d12442eab4
content-disposition: form-data; name="checknewmsg"
180000
-----------------------------7d12442eab4
content-disposition: form-data; name="charcount"
'.$charcount.'
-----------------------------7d12442eab4
content-disposition: form-data; name="msg"
'.$message.'
-----------------------------7d12442eab4
content-disposition: form-data; name="x"
30
-----------------------------7d12442eab4
content-disposition: form-data; name="y"
16
-----------------------------7d12442eab4--
';
$remote = fsockopen("web.icq.com", 80, &$errno, &$errstr, 30);
global $remote;
global $post;
fputs($remote, $post);
while (!feof($remote)) { $htmlreply.=fgets($remote,120); }
//uncomment for output: echo "".htmlspecialchars($htmlreply)."";
fclose($remote);
//****************************************************************// check if message is send if send 'moved permanently' is returned
if (eregi('moved permanently',$htmlreply))
{ echo "sms message successfully sent!"; }
else
{ echo "sms not sent!"; }
代码如下 | 复制代码 |
<html> <head> <title>在线调查程序代码</title> </head> <body> <form method="post" action="survey.php教程"> <p><input type="radio" value="0" name="vote">调查项目一</p> <p><input type="radio" name="vote" value="1">调查项目二</p> <p><input type="radio" name="vote" value="2">调查项目三</p> <p><input type="radio" name="vote" value="3">调查项目四</p> <p><input type="radio" name="vote" value="4">调查项目五</p> <p><input type="hidden" name="go" value="1"> <p><input type="submit" value="提交" name="b1"></p> <a href="www.111cn.net.php?result=1">查看结果</a> </form> </body> </html> |
//survey.php
<?
代码如下 | 复制代码 |
/* /*如果ip不重复,则执行以下程序*/ /*写入投票结果后并显示投票结果*/ |
/*
data.txt 文件
调查项目一
调查项目二
调查项目三
调查项目四
调查项目五
*/
?>
非常简单的日历类
代码如下 | 复制代码 |
date_default_timezone_set("etc/gmt-8"); class calendar{ var $t = array(); function set($time){ function isrun(){ function first(){ function html(){ $calendar = new calendar(); |
代码如下 | 复制代码 |
if( $_post )
}else{ } |
代码如下 | 复制代码 |
<html> |