- Desde
- 18 Jul 2013
- Mensajes
- 80
Por favor, ten en cuenta 📝 que si deseas hacer un trato 🤝 con este usuario, está baneado 🔒.
Hola. me he encontrado con este script que funciona, pero el problema es que me envia las post en texto palno y no en html, ademas a las tildes y Ñ les pone letras raras. alguna sugerencia para solucionar eso?.
PHP:
<?php
//Your Blog’s Keyword:
//$keyword = 'keyword';
//How many articles do you want to grab each time?
$num = 2;
//Get the RSS Feed - In this instance, we’re using a google blogsearch feed based on our chosen keyword
$feed = simplexml_load_file("http://www.wp.com/xxxxxx");
//Loop through our keywords
foreach ($feed->channel->item as $item) {
if($i < $num){
//Have a bit of a rest so we’re not posting too fast to our blogger blog
sleep(10);
$title = $item->title;
$title = str_replace('<b>', '', $title);
$subject = str_replace('</b>', '', $title);
$link = $item->link;
$description = $item->description;
$description = str_replace('<b>', '', $description);
$body = str_replace('</b>', '', $description);
//put our secret blogger email address here:
$to = 'xxxxx@xxxxxr.com';
//ignore this line - the script just needs something in the 'From' field.
$headers = 'From: xxxx@mail.com';
//Send the email / How’d we go?
if(mail($to, $subject, $body, $headers)) {
echo $subject. ' - sent<br>';
}
else
{
echo $subject. ' - NOT sent<br>';
}
}
//add one to our counter
$i++;
}
?>