因为我没怎么学过php,但是现在又需要一些功能的实现,所以厚颜来求代码,见谅。。
<?php$name = '刘著';
$pwd = '123456';
$url = 'http://www.baidu.com';//如何把[name]、[pwd] POST 到 [url] 去 ,并获得其返回值??$result = '????';echo $result;?>
<?php$name = '刘著';
$pwd = '123456';
$url = 'http://www.baidu.com';//如何把[name]、[pwd] POST 到 [url] 去 ,并获得其返回值??$result = '????';echo $result;?>
建议csdn加入“关注此帖”的功能,类似mop那样的。
http://www.baidu.com?name=xxx&pwd=xxx然後再提交的頁面用 $_GET["name"]
这样获取.
$formdata = 'name='.urlencode('刘著').'&pwd=123456';
$opts = array(
'http'=>array(
'method'=>"POST",
'header'=>"Accept: application/json, text/javascript, */*\r\n" .
"Content-Type: application/x-www-form-urlencoded\r\n".
"Content-Length: ".strlen($formdata)."\r\n",
'content'=>"{$formdata}",
)
);$context = stream_context_create($opts);$return = file_get_contents('http://www.baidu.com/', false, $context);...
Dim ix, thisStr, ThisCode, newcode
If code = "" Then
CodeToUni = ""
Exit Function
End If
For ix = 1 To Len(code)
thisStr = Right(Left(code, ix), 1)
ThisCode = Hex(AscW(thisStr))
If Len(ThisCode) = 1 Then
ThisCode = "000" + ThisCode
ElseIf Len(ThisCode) = 2 Then
ThisCode = "00" + ThisCode
ElseIf Len(ThisCode) = 3 Then
ThisCode = "0" + ThisCode
End If
newcode = newcode + ThisCode
Next
CodeToUni = newcode
End Function==============================
CodeToUni(“测试”) = “6D4B8BD5”