Using curl() when Javascript is involved
Posted: Tue May 11, 2010 11:00 am
Can I use curl() to grab the contents of another page if there is javascript running on the page?
I'm working with a client who has permission to use some of the contents of another website (he's a car salesman and the other site is his dealership's car listings). I've used curl() to grab the listings and preg_replace() to make some textual changes like altering the contact information to show his details. However, the other website uses a Javascript pager for its listings and when I output the altered code, the pager no longer works.
Here is how the site I'm 'curling' is set up:
It has this form element:
I'm working with a client who has permission to use some of the contents of another website (he's a car salesman and the other site is his dealership's car listings). I've used curl() to grab the listings and preg_replace() to make some textual changes like altering the contact information to show his details. However, the other website uses a Javascript pager for its listings and when I output the altered code, the pager no longer works.
Here is how the site I'm 'curling' is set up:
It has this form element:
<form name="ctl00" method="post" action="http://originalsite" id="ctl00">