php - curl, crowbar...passing to jquery -
<?php function get_html($url) { $curl = curl_init(); curl_setopt ($curl, curlopt_url, 'http://127.0.0.1:10000/?url=' . $url . '&delay=3000&view=as-is'); curl_setopt($curl, curlopt_returntransfer, 1); $html = curl_exec ($curl); return $html; } ?>
im using php code access html using crowbar...my question is, how pass html jquery processing (scraping).
my jquery starts document.ready(function(), work since crowbar loads dom in browser?
this of jquery code:
$(document).ready(function(){ var title = $('title').text(); $.ajax({ type: "post", url: "tosql.php", data: {title:title} }); });
im getting title (for test purposes) because pass php stored in mysql
yes, jquery can manipulate in dom after loads via document.ready wrapper. if need easier manipulation, have crowbar render data object or array inside of <script>
tags. if have more code show can give more complete answer.
Comments
Post a Comment