post web page to php
I want to post a whole page using ajax to php file to be parsed.
s开发者_高级运维ay the sources is `http://www.mysite.com/page-1.
now post this page (from <html> to </html>
) to "parse-page.php". and retrieve it with $_POST['document'].
Considering you just want to post the data and ignore anything coming back from the php, this should work.
$.post("parse-page.php", {'document', $('body').html()});
For more info: http://api.jquery.com/jQuery.post/
I'm thinking you can use javascript to store the innertext of the html tag and send that variable through ajax.
精彩评论