搜索下载了苏飞提供的httphelper,比着例子写了瞬间先后,结果回到的html总是错误页,于是又翻sufeinet论坛上边的帖子,搜索到有人用苏飞开发助手测试远程公布,于是也下载下来测试了瞬间,结果成功了,对照苏飞开发助手生成的代码和自己写的代码的距离,最后发现标题出现在cookie上边。直接写result.cookie赋值的cookie值有局地path=/
类似的字符串。
然后在报到的时候更新。
那篇随笔本来就没怎么好讲的,就不管扯扯。问了随后自己和学弟想要改的时候找得到地点。。
说到底选用代码如下:
多年来新上线了一个网站,专门采访网上签到赚钱,有奖活动等等的网站
我快要集分宝 http://www.591jfb.com。新确立
了一个栏目“每天更新”,那样就须求每日都登录到网站后台去发表小说,感觉有些麻烦,于是就想找点省劲的法门,于是便有了此文。
本来想在AC了题后也足以增添的。但是因为某事不想去做了(为和谐挖个坑,呵呵~有时间闲的蛋疼才去弄)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Utility;
namespace PostArticle2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
HttpHelper http = new HttpHelper();
HttpItem item = null;
HttpResult result = null;
item = new HttpItem()
{
URL = "http://php.sxg.com/zb_system/cmd.php?act=verify",
Referer = "http://php.sxg.com/zb_system/login.php",
Method = "post",//URL 可选项 默认为Get
ContentType = "application/x-www-form-urlencoded",
Postdata = "btnPost=%E7%99%BB%E5%BD%95&username=username&password=pwd&savedate=0&dishtml5=0",
};
result = http.GetHtml(item);
string cookie = string.Empty;
foreach (CookieItem s in HttpCookieHelper.GetCookieList(result.Cookie))
{
cookie += HttpCookieHelper.CookieFormat(s.Key, s.Value);
}
item = new HttpItem()
{
URL = "http://php.sxg.com/zb_system/cmd.php?act=ArticlePst",
Referer = "http://php.sxg.com/zb_system/admin/edit.php?act=ArticleEdt",
Cookie = cookie,
Method = "post",
Postdata = "ID=0&Type=0&Title=1720sxg&Content=%3Cp%3Esxgsxg%3C%2Fp%3E&meta_keywords=&meta_description=&Alias=&Tag=&Intro=&CateID=1&Status=0&Template=single&AuthorID=1&PostTime=2015-01-13+11%3A37%3A01&IsTop=0&IsLock=0",
Allowautoredirect = true,
ContentType = "application/x-www-form-urlencoded",
Host = "php.sxg.com",
ResultType = ResultType.String
};
http.GetHtml(item);
}
}
}
至于突显的话,在html/include/profile.php文件。
第一句本来是SELECT user_id(学号) …被我改成了搜nick(姓名),money(星);
当然呈现的是学号,个人认为不佳看就顺手改成呈现汉语的真名了~
查看答案功用(那个前面讲);我就想开了学习51nod上边的消耗点东西去查看答案。
此间要提一下,那三句话都被自己改过。
首先改变数据库,在表users上添加一个money 的字段
骨干步骤跟上一篇的大都。
其三句话是在账号后边展现星的数目。。
$row= mysql_fetch_array(mysql_query("SELECT nick,money FROM users WHERE user_id='{$_SESSION['user_id']}' LIMIT 1"));
$profile.= "<i class=icon-user></i><a href=./modifypage.php>$MSG_USERINFO</a> <a href='./userinfo.php?user=$sid'>".$row['nick']."</a>";
//做个记号
$profile.= " <i class=icon-star></i>(".$row['money'].")";
既然如此上篇文件涉及了,我就先把这一个写出来啊。为了鼓励学弟学妹们积极签到,还有就是自我做了一个