
09 Kasım 2018, 10:53
|
|
PHP- Kodu:
<?php
date_default_timezone_set('Europe/Istanbul');
if(date('H')>17){
$bugun = date("Y-m-d");
$cevir = strtotime('+1 day',strtotime($bugun));
$get = date("Y-m-d",$cevir);
}else{
$get= date('Y-m-d');
}
$url = 'http://www.malatyaeczaciodasi.org.tr/nobetci_eczaneleri_yazdir.php?gunun_tarihi='.$get;
$icerik = file_get_contents($url);
$icerik = str_replace('<body >','',$icerik);
$icerik = str_replace('P.MsoNormal {
FONT-SIZE: 12pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; margin-left:0cm; margin-right:0cm; margin-top:0cm; margin-bottom:0pt
}','',$icerik);
$icerik = str_replace('</STYLE></head>','',$icerik);
$icerik = str_replace('<title>Eczane Nöbet Listesi</title><STYLE>H4 {
FONT-WEIGHT: normal; FONT-SIZE: 24pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: center
}','',$icerik);
$icerik = str_replace('<head>
<meta http-equiv="Content-Language" content="tr">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1254">','',$icerik);
$icerik = str_replace('<html>','',$icerik);
$icerik = str_replace('</html><script>javascript:print();</script>','',$icerik);
$icerik = str_replace('</body>','',$icerik);
echo $icerik;
?>
|