This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
url: '/echo/error/', | |
async: true, | |
// retryCount and retryLimit will let you retry a determined number of times | |
retryCount: 0, | |
retryLimit: 10, | |
// retryTimeout limits the total time retrying (in milliseconds) | |
retryTimeout: 10000, | |
// timeout for each request | |
timeout: 1000, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vi /etc/sysctl.conf | |
将 net.ipv4.ip_forward=0 | |
修改成 net.ipv4.ip_forward=1 | |
sysctl -p | |
iptables -L -n -t nat 看规则列表 | |
iptables -t nat -F 清空原有的nat规则 | |
iptables -t nat -Z 清空原有的nat规则 | |
iptables -F 清空所有的正常规则 | |
iptables -X 清空所有的正常规则 | |
iptables -Z 清空所有的正常规则 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Use curl for http to send body for the form array, header for the head array | |
* Reference: http: //www.q3060.com/list3/list117/28490.html | |
*/ | |
function sendPostRequest($url,$body,$header=null) | |
{ | |
$ch = curl_init (); | |
curl_setopt ( $ch, CURLOPT_URL, $url ); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Expect: ")); //Increase the sending speed : | |
curl_setopt($ch, CURLOPT_POST,true); |
NewerOlder