ebody: Ajax und Google Suche

Beitrag lesen

Hallo,

per JQuery Ajax Funktion lese ich den Code einer Seite ein. Das funktioniert auch für jede URL, nur wenn ich eine Google URL inkl. Suchparameter abfrage (z.B. https://www.google.de/search?q=jquery+ajax), funktioniert es nicht.

Andere URLs mit https habe ich getestet und hat immer funktioniert.

Wenn ich nur die ajax.php mit der Google URL teste ist alles ok.

Hat jemand eine Idee, warum das nicht funktioniert?

Jquery Code:

$.ajax({  
			type: "GET",  
			url : "ajax.php",  
			dataType: "json",  
			data: { seite: "https://www.google.de/search?q=jquery+ajax", art: "suche" },  
			error: function () {  
				console.log("Oh no! Something went terribly wrong in here!");  
			}  
		})  
		.done(function (data) {  
				console.log("Inhalt: " + data.content);  
			});

ajax.php Code:

  
set_time_limit(90);  
error_reporting(E_ALL);  
  
//$_GET['seite'] = 'https://www.google.de/search?q=jquery+ajax';  
  
$htmlCode = file_get_contents($_GET['seite']);  
//$htmlCode = $_GET['seite'];  
  
$json = array(  
	"content" => $htmlCode,  
);  
  
//var_dump($json);  
//echo $htmlCode;  
echo json_encode($json);  

Gruß
ebody