1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | <?php $target_day = date ( 'Y/m/d' , strtotime ( '-1 day' )); $xmlData = simplexml_load_file( $xml ); foreach ( $xmlData ->item as $entry ){ $day = date ( 'Y/m/d' , strtotime ( $dc -> date )); if ( $day == $target_day ){ $string .= date ( 'Y/m/d h:i' , strtotime ( $dc -> date )). "<br>" ; $string .= $entry ->title. "<br>" ; $string .= $entry ->link. "<br>" ; } } ?> <html> <body> <?php echo $string ; ?> </body> </html> |
OK、次はslack webhook