I have a screen scrape code in PHP like this:
<?
$url = 'https://www.google.nl/search?q=cars';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$curl_scraped_page = curl_exec($ch);
curl_close($ch);
echo $curl_scraped_page;
?>
I also have a Jquery(ajax) script which can fetch the proxy like this:
$.get('ThePhpFile.php', function(data){
$(data).appendTo('div')
}
Everything is working fine, but now I would like to set the URL to be scraped as a variable which is in fact the value of some input in parent document (I'm working with iframes). I know how to do this in Jquery:
var TheUrl = $("input", parent.document.body).val();
So my question is how do I set the variable to work with the PHP code. Is it necessary to put it in the PHP code? How do I do that?