This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sendEmail($to,$from,$subject,$message){ | |
$mail=wireMail(); | |
$mail->to($to)->from($from);//from('quien envia el mail') All calls can be chained | |
$mail->subject($subject); //subject('Mail Subject'); | |
$mail->body($message);//body('Mail Body'); | |
$mail->bodyHTML($message); | |
$mail->send(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//CREAMOS LA FUNCION | |
function suscribir($solicitud) { | |
// Datos de configuracion | |
$carpetaSuscriptores = '/boletines/'; // padre donde se crea el nuevo suscriptor | |
$plantillaSuscriptores = 'boletin'; // tipo de plantilla para el suscriptor | |
$email = wire(sanitizer)->email($solicitud); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//CREAMOS PRIMERO LA FUNCION | |
function registerUser($email2, $name, $email, $password, $password2 ){ | |
/** | |
* Check for spam and last 2 lines to the code | |
*/ | |
if (trim($email2) != '') return 'spam'; | |
// <input type="text" name="email2" id="email2"> | |
// <style type="text/css">#email2 { display: none; }</style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$correo="./correos/correo_prueba.php"; //Esto cogerá la configuración de correo para que tenga colores y sea más bonito (la que tenemos en la carpeta correos) | |
$body =file_get_contents($correo); //Esto lo que hace es que $body sustituirá a la variable $mensaje que recogeremos del formulario | |
//correo_prueba.php y correo_prueba2.php son modelos de email donde solo tendremos que cambiar el cuerpo del mensaje, en principio podriamos cambiar el texto | |
//en cada archivo, pero podemos crear archivos correo_prueba con el nombre y el texto de lo que vamos a enviar, ya sea publicidad, ofertas, cv, etc. | |
function sendEmail($to,$from,$subject,$message){ | |
$mail=wireMail(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | |
<title>tu tilulo</title> | |
<style type="text/css"> | |
/* Based on The MailChimp Reset INLINE: Yes. */ | |
/* Client-specific Styles */ | |
#outlook a {padding:0;} /* Force Outlook to provide a "view in browser" menu link. */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Función para enviar Emails para Processwire wireMailSmtp | |
function sendEmail($to,$from,$subject,$message){ | |
$mail=wireMail(); | |
$mail->to($to)->from($from);//from('quien envia el mail') All calls can be chained | |
$mail->subject($subject); //subject('Mail Subject'); | |
$mail->body($message);//body('Mail Body'); | |
$mail->bodyHTML($message); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ($input->post->email){ | |
$mail=wireMail(); | |
$mail->to('correo de destino')->from($input->post->email);//from('quien envia el mail') | |
$mail->subject($input->post->subject); //subject('Mail Subject'); | |
$mail->body($input->post->message);//body('Mail Body'); | |
$mail->bodyHTML($input->post->message); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ob_end_clean(); | |
require_once('./simple_html_dom.php'); //cargamos el simplehtmldom. | |
$webP='http://www.lawebmunicipal.com/municipiosdeespana/_AYmkWjY0YBdpm4FBve1nKU8CuD8jCTjl'; | |
$web='http://www.lawebmunicipal.com/municipiosdeespana/municipiosdeespana/_fI8m9PaUnfIq0wYD5vTu3LJJIBLs9my7iI2Nn_uKguZva8oCrSAlYA'; | |
$provincias=[]; | |
$municipios=[]; | |
//Atacar la pagina web que queremos (en este el enlace al listado de municipios) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$servidor = "localhost"; | |
$usuario = "marcadores"; | |
$pass = "marcadores"; | |
$basedatos = "marcadores"; | |
echo "<table border=1><tr><td>Username</td><td>DNI</td><td>Nombre</td><td>Apellido</td><td>Email</td> | |
<td>Telefono</td><td>Direccion</td><td>Password</td><td>FechaNacimiento</td><td>Sexo</td></tr>"; | |
$conexion = mysql_connect($servidor,$usuario,$pass); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Seleccion de la base de datos en la que vamos a trabajar | |
mysql_select_db($basedatos, $conexion); | |
//Introducción de datos en la tabla Agenda | |
mysql_query("INSERT INTO Agenda (Nombre, Apellido, Edad, Telefono) | |
VALUES ('Robert','McEnzie',37,'635912345')"); | |
mysql_query("INSERT INTO Agenda (Nombre, Apellido, Edad, Telefono) |
NewerOlder