這裡記錄了聿王爺的點點滴滴!
我要留言
<?php
//do quality checks on the incoming data here.
//then bundle the request and send it to Salesforce.com
$req = "&lead_source=". urlencode($_REQUEST["leadSource"]);
$req .= "&first_name=" . urlencode($_REQUEST["firstName"]);
$req .= "&last_name=" . urlencode($_REQUEST["lastName"]);
$req .= "&title=" . urlencode($_REQUEST["title"]);
$req .= "&company=" . urlencode($_REQUEST["company"]);
$req .= "&email=" . urlencode($_REQUEST["email"]);
$req .= "&phone=" . urlencode($_REQUEST["phone"]);
$req .= "&street=" . urlencode($_REQUEST["street"]);
$req .= "&city=" . urlencode($_REQUEST["city"]);
$req .= "&state=" . urlencode($_REQUEST["state"]);
$req .= "&zip=" . urlencode($_REQUEST["zip"]);
$req .= "&debug=" . urlencode("0");
$req .= "&oid=" . urlencode("<Your Salesforce Org Id here>");
$req .= "&retURL=" . urlencode("<Your return url here>");
$req .= "&debugEmail=" . urlencode("<email for debugging>");
$header = "POST /servlet/servlet.WebToLead?encoding=UTF-8 HTTP/1.0\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Host: www.salesforce.com\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
$fp = fsockopen ('www.salesforce.com', 80, $errno, $errstr, 30);
if (!$fp) {
echo "No connection made";
} else {
fputs ($fp, $header . $req);
while (!feof($fp)) {
$res = fgets ($fp, 1024);
echo $res;
}
}
fclose($fp);
?>
<script language=JavaScript>todomain=www.you.com;domain=location.href.replace("http://","").split("/")[0];if(todomain!=domain){ alert(" ...《 詳全文 》
只適用linux 編輯 .htaccess 加入下面語句 RewriteEngine onRewriteCond %{HTTP_REFERER} !^http://yourname.com/.*$ [NC]RewriteCond %{HTTP_REFERER} !^http://yourname.com$ [NC]Rew ...《 詳全文 》
如果有使用session_start();在擋頭,那表單不會留原來key過的這時只要在session_start(); 之前加入session_cache_limiter("private");或session_cache_limiter("public"); ...《 詳全文 》
<input name="idname" type="text" id="idname" size="10"> if(document.activeElement.id == "idname&qu ...《 詳全文 》
<select name="select" id="select" onchange="alert(this.selectedIndex);"><option value=""></option> <option value= ...《 詳全文 》
<?PHP//將big5轉換成10進位$db=mysql_pconnect("localhost","root","8763");mysql_select_db("test");mysql_query("set names big5"); ...《 詳全文 》
$browser = new COM("InternetExplorer.Application");$handle = $browser->HWND;$browser->Visible = true;$browser->Fullscreen = true;$browser->Navigate("http ...《 詳全文 》