我正在運行代理,所以我可以通過url參數對數據執行ajax請求。代理PHP的樣子:通過代理傳遞url屬性
<?php
header('Content-type: application/xml');
$daurl = 'http://thesite.com/form.asp';
$handle = fopen($daurl, "r");
if ($handle) {
while (!feof($handle)) {
$buffer = fgets($handle, 4096);
echo $buffer;
}
fclose($handle);
}
?>
我打阿賈克斯在結束了附加參數,如代理:
$j.ajax({
type: 'GET',
url: 'sandbox/proxy.php',
data: 'order=' + ordervalue,
dataType: 'html',
success: function(response) {
$j("#result").html(response);
}
});
所以請求是像沙箱/ proxy.php順序= 123
我該如何獲取數據(order = 123)並將其附加到$ daurl變量(http://thesite.com/form.asp?order=123),以便我可以讓代理實際返回一些內容?
這是一塊處女地,我所以你不能過度解釋=)
太棒了!非常感謝。 – Zac 2010-11-24 18:38:00