function doWork($info, $titulo, $fecha) { $archivoFeed = "../database/feed.txt"; $archivoFeedHandle = fopen($archivoFeed, 'a') or die("can't open file"); $noticia = $titulo . "%" . $fecha . "%" . $info . "#EON"; str_replace("á", "á", $noticia); str_replace("é", "é", $noticia); str_replace("í", "í", $noticia); str_replace("ó", "ó", $noticia); str_replace("ú", "ú", $noticia); //mayuscula str_replace("Á", "Á", $noticia); str_replace("É", "É", $noticia); str_replace("Í", "Í", $noticia); str_replace("Ó", "Ó", $noticia); str_replace("Ú", "Ú", $noticia); fwrite($archivoFeedHandle, $titulo . "%" . $fecha . "%" . $info . "#EON"); // #EON End Of Notice fclose($archivoFeedHandle); /// se notifican a los changos /// echo "Se han notificado: " . notificarLista("../database/newsletter.xml", $titulo); /*echo '<form enctype="multipart/form-data" name="carga" method="post" action="http://pegsoluciones.com/proyectos/envios/notificar.php"> <div>Titulo: <input id="titulo" type="text" name="titulo" value="'.$titulo.'" readonly /><br /></div> </br> </br> <div>Enviar mails <input type="submit" value="Submit" /> </div> </form>'; */ }
<?php $titulo = $_POST["titulo"]; include "php-functions/fun_envio_peg.php"; $pearl = 0; //no se usa pearl $cant = notificarLista("database/mails.xml", $titulo, $pearl); echo 'se notificaron ' . $cant . ' usuarios';