|
楼主 |
发表于 2013-4-2 16:42:32
|
显示全部楼层
string AugcKey = ConfigurationManager.AppSettings["ugc"];
if (Session["imgurl"] != null)
{
string Augcid = Request.QueryString["ugcid"].ToString();
byte[] Aimg = getpic(Session["imgurl"].ToString());
System.Net.WebClient WebClientObj = new System.Net.WebClient();
System.Collections.Specialized.NameValueCollection PostVars = new System.Collections.Specialized.NameValueCollection();
PostVars.Add("AugcKey", AugcKey);
PostVars.Add("ugcid", Augcid);
PostVars.Add("userid", "0fbe1d92-4a23-4b28-b50b-1f77057b69f0");
PostVars.Add("sitestr", "1-4a23-4b28-b50b-1f77057b69f0");
PostVars.Add("pic",Aimg.ToString());
try
{
byte[] byRemoteInfo = WebClientObj.UploadValues("http://oa.mgogo.com/spritebb/interface/add_share.php", "POST",PostVars);
//下面都没用啦,就上面一句话就可以了
string sRemoteInfo = System.Text.Encoding.Default.GetString(byRemoteInfo);
//这是获取返回信息
//richTextBox_instr.Text += sRemoteInfo;
}
catch
{
}
}
图片参数怎么加进去? |
|