我有以下内容:
if (isset($_GET['orderid'])){
echo file_get_contents("http://www.tuffnells.co.uk/PODLookupResults.aspx?__EVENTTARGET=&__EVENTARGUMENT=&__VIEWSTATEGUID=7ca82b1d-b722-4cdc-b74a-b338d8577ffa&__VIEWSTATE=&__EVENTVALIDATION=%2FwEdAAevVXD1oYELeveMr0vHCmYPaomE%2FDwQD43eOdzEj3p%2Fm4U4pgxq6tlupSJfQZQBazFFj%2F1LmlGLyHFagz1yHZm8bjowVgAJ8C3e%2B2bVMPt91KjXCHjnAsonQDi2zFSuasUVzpitHiLDCDtiLHCjNCQG4CxrbV5VPFqBeOgs2X52AD%2FEb%2BYR%2BEJ68PaN2CiyKzE%3D&ctl00%24ctl16%24tbHeaderSearch=Search..&ctl00%24maincontent%24tbAccountRef=01484267&ctl00%24maincontent%24tbConsignmentRef=".$_GET['orderid']."&ctl00%24maincontent%24tbDestPostcode=".$_GET['postcode']."&ctl00%24maincontent%24btnDoPODLookup=Search+Again");
}
一旦我工作,将使用AJAX将其从此处拉出来但是测试它,我想我还需要设置它所通过的JS和CSS文件的路径,但是所有都像/ Scripts / / css /等。 ..有没有办法在他们面前申请tuffnells.co.uk/因为我认为该页面没有工作,因为js没有加载。
该页面看起来像默认表单,并且没有通过并显示跟踪数据,就像我使用此网址时那样
http://www.tuffnells.co.uk/PODLookupResults.aspx?__EVENTTARGET=&__EVENTARGUMENT=&__VIEWSTATEGUID=7ca82b1d-b722-4cdc-b74a-b338d8577ffa&__VIEWSTATE=&__EVENTVALIDATION=%2FwEdAAevVXD1oYELeveMr0vHCmYPaomE%2FDwQD43eOdzEj3p%2Fm4U4pgxq6tlupSJfQZQBazFFj%2F1LmlGLyHFagz1yHZm8bjowVgAJ8C3e%2B2bVMPt91KjXCHjnAsonQDi2zFSuasUVzpitHiLDCDtiLHCjNCQG4CxrbV5VPFqBeOgs2X52AD%2FEb%2BYR%2BEJ68PaN2CiyKzE%3D&ctl00%24ctl16%24tbHeaderSearch=Search..&ctl00%24maincontent%24tbAccountRef=01484267&ctl00%24maincontent%24tbConsignmentRef=2837&ctl00%24maincontent%24tbDestPostcode=AL15BY&ctl00%24maincontent%24btnDoPODLookup=Search+Again
用于file_get_contents的网址是哪个...任何想法?
到目前为止,我想要使用的是这个,这也是正确的吗?
<div id="tracking"></div>
<script type="text/javascript">
var orderid = "2837";
var postcode = "AL15BY";
$.ajax({
url: 'http://www.ambientlounge.com/external/ukTracking.php',
type: 'POST',
data: {
orderid: orderid,
postcode: postcode
},
success: function(data) {
$('#tracking').html($(data).find('#ctl00_maincontent_pnlPODRecords').html());
}
});
</script>
我想获取页面数据,然后理想地返回到AJAX以显示在我们的一个页面上,只显示#ctl00_maincontent_pnlPODRecords
div及其内容。