Javascript içinde değişken baskı ile sorun var.
variable htmlString printing çalışmıyor: document.write(htmlString)
<?php $htmlString= htmlspecialchars(file_get_contents('http://google.com'));?>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<script type="text/javascript">
var htmlString="<?php echo $htmlString; ?>";
document.write(htmlString);
</script>
</body>
</html>
Edit:
Webpage source result: - Get all google.com inside htmlString the var not printed on the page (Ben onun çok uzun çünkü htmlString ait tüm içeriği kesilmiş)
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<script type="text/javascript">
var htmlString="<!doctype html><html><head><metahttp-equiv="content-type" cotring)";
document.write(htmlString);
</script>
</body>
</html>
Teşekkürler