• Aviso Legal
  • About

Bienvenidos al Blog de David Rodriguez

Category Archives: Internet

Web Activolution en portugues de brasil

abril 21, 2010 5:44 pm / Leave a Comment / David Rodriguez

Continuando con plan de internacionalización de Activolution, se ha creado la web en portugués de brasil para que nuestros clientes de Portugal y Brasil tengan actualizaciones de los servicios ofrecidos por la empresa de marketing online Activolution.

Web Activolution brasil

Web Activolution brasil

Esperamos estar mucho más unidos a nuestros clientes en Brasil y ser su  socio en internet!!!

Bem-vindo à empresa de marketing online Activolution

Dentro de poco en Inglés e italiano!!!!!!

Posted in: Empresas, Internet, marketing / Tagged: activolution, brasil, desarrollo web, Internet, marketing, marketing online

Activolution, resultados primer cuatrimestre 2010

abril 9, 2010 10:15 am / Leave a Comment / David Rodriguez
logo Activolution

logo Activolution

Tal y como comenta Ricardo Sancho, CEO de Activolution en su blog, la empresa de marketing online Activolution ha conseguido en el primer cuarto de año, los mejores resultados de su historia en este periodo. Esperemos que sean los famosos «brotes verdes» y consigamos el objetivo de 1,8 millones de euros de facturación a final de Año.

Estoy seguro que el plan de expansión internacional de Activolution

, y la apertura de las nuevas oficinas en Brasil, estos objetivos se nos van a quedar cortos.

Posted in: Empresas, Internet, marketing / Tagged: activolution, Empresas, negocios

Actualizacion Pagerank Abril 2010

abril 8, 2010 4:00 pm / Leave a Comment / David Rodriguez

A principios de abril, google ha actualizado el pagerank de distintas webs. En este caso, hemos tenido descenso de pagerank en varias paginas .. aunque hemos aumentado a PR 5 en la pagina de cursos y masters topformacion.com.

↑ PR 5 www.topformacion.com
↓ PR 3 www.tuguarderia.com
↓ PR 2 www.diariodeunfranquiciado.com
↓ PR 3 www.franquiciando.com
↑ PR 3 www.residenciasensevilla.com
Posted in: Internet, marketing, SEO

Actualizacion modulo envio de correos en de PHPMimeMail a RMail

abril 8, 2010 9:21 am / Leave a Comment / David Rodriguez

Hemos venido utilizando desde hace muchos años el modulo PHPMimeMail para el envio de correos en PHP, es una clase que funciona muy bien y estaba muy implementado.

El problema es que se está quedando obsoleta. El mismo creador, ha creado RMail, otro modulo de envio que funciona para PHP5 y que hemos comprobado con nuestros desarrollos web, que mejora en un 70% los tiempos de envio.

El proceso de actualización es muy sencillo ya que los metodos utilizados en ambos módulos son similares.

Method Description
Constructor Doesn’t take any arguments. Not much to say I guess.
setCRLF(string $crlf) Sets the CRLF line ending type to use. You should not use this unless you’re sure you know what you’re doing, as the code will correctly (most of the time) determine which type to use by itself.
setSMTPParams(string $host,
int $port,
string $helo,
bool $auth,
string $user,
string $pass)
Set SMTP parameters when using SMTP to send the email. All optional, though not specifying any would be pointless… Pretty self explanatory really – hostname to connect to, port to connect to, text to send as part of the HELO command, whether to use SMTP authentication, and if so the username and password to use.
setSendmailPath(string $path) Sets the path to use when using sendmail method of sending the email. This should be the full path to the sendmail binary on your system, along with any command line parameters. Defaults to «/usr/lib/sendmail -ti».
setTextEncoding(object $encoding) Sets the encoding to use (if any) on the plain text part of the email. The argument should be one of the encoding objects, ie Base64Encoding, QPrintEncoding, SevenBitEncoding or EightBitEncoding. Bit pants about the 7bit/8bit names, but identifiers in PHP can’t start with a number. Tits.
setHTMLEncoding(object $encoding) Sets the encoding to use (if any) on the HTML part of the email. The argument should be one of the encoding objects, ie Base64Encoding, QPrintEncoding, SevenBitEncoding or EightBitEncoding.
setTextCharset(string $charset) Sets the characterset to use on the plain text portion of the email. Defaults to «ISO-8859-1».
setHTMLCharset(string $charset) Sets the characterset to use on the plain text portion of the email. Defaults to «ISO-8859-1».
setHeadCharset(string $charset) Sets the characterset to use on the headers of the email. Defaults to «ISO-8859-1».
setTextWrap(int $count) Set the point at which text is wrapped in the email. Defaults to 998, which is a limit imposed by the SMTP standard.
setHeader(string $name, string $value) Sets a header of the email. First argument if the name of the email, second is the value.
setSubject(string $subject) Sets the subject of the email.
setFrom(string $from) Sets the From: header of the email.
setPriority(mixed $priority) Sets the priority of the email. Defaults to «normal». Argument can be either «high», «normal» or «low», or 1, 3 or 5 respectively.
setReturnPath(string $return_path) Sets the Return-Path: of the email. This is the address to which bounces will be sent if the email fails to be delivered.
setCc(string $cc) Sets the Cc: header of the email. The email will be delivered to these addresses as well as those specified in the send() method.
setBcc(string $bcc) Sets the Bcc: header of the email. The email will be delivered to these addresses as well as those specified in the send() method. However, the Bcc: header will be removed from email before it is sent, so those addresses in the To: and Cc: headers will not know it has also been sent to these addresses. Hence, «Blind» Carbon Copy.
setText(string $text) Sets the text part of the email.
setHTML(string $html[, string $images_dir]) Sets the HTML part of the email. The optional second argument specifies a directory where the code should look for images referenced by the HTML. If found, these images will automatically be embedded into the email.
addEmbeddedImage(object $embeddedImage) Adds an embeddded image to the email. The argument should be on of the fileEmbeddedImage or stringEmbeddedImage objects, depending on the source of the image.
addAttachment(object $attachment) Adds an attachment to the email. The argument should be one of the fileAttachment or stringAttachment objects, depending on the source of the attachment.
send(array $recipients[, string $type]) Sends the email. The first argument is an array of recipients to whom the email will be sent to. The second is how to send the email. This can be one of «mail», «sendmail» or «smtp», and defaults to «mail».
getRFC822(array $recipients[, string $type]) This function first of all builds the email, and then returns it in text format. This is useful if you need to attach the email to another email. This could be done like so: $mail_2->addAttachment(new stringAttachment($mail_1->getRFC822(array(‘[email protected]’)), ‘message/rfc822’)) The first argument is an array of recipients to place in the To: header, whilst the second, optional, $type argument should be the same as that you intend to use eventually for the send() method. This is to ensure the correct line endings are used.
Posted in: Internet, Programacion / Tagged: optimización, php, Programacion, rmail

redireccionar a un idioma segun el pais del usuario

abril 5, 2010 1:14 pm / 5 Comments / David Rodriguez

Para redireccionar a un usuario según sea su pais de procedencia (bueno .. ya sabemos que los servidores desde donde se conectan los usuarios no son 100% fiables .. pero es la unica forma que tenemos de saberlo), utilizamos el api de hostip.info y cargamos el xml que nos dan.

Actualización (2017-06-14): El url api.hostip.info no está devolviendo nada. Buscaré otro api para actualizar el post.

Para ello hemos definido la siguiente función:

function getPaisProcedencia(){
$salida = »;

$IPADDRESS = $_SERVER[«REMOTE_ADDR»];

$archivo_xml = «http://api.hostip.info/get_xml.php?ip=».$IPADDRESS .»»;
$procedencia_xml = get_url_contents ($archivo_xml);

if (empty($procedencia_xml)){
$salida = »;
}else{
preg_match_all(«|<Hostip>(.*)</Hostip>|sU», $procedencia_xml, $items);
$lista_nodos = array();
foreach ($items[1] as $key => $item)
{
//preg_match(«|<gml:name>(.*)</gml:name>|s», $item, $mi_lugar);
//preg_match(«|<countryName>(.*)</countryName>|s», $item, $mi_pais);
preg_match(«|<countryAbbrev>(.*)</countryAbbrev>|s», $item, $mi_sigla);
$salida = $mi_sigla[1];
}
$procedencia_xml = «»;
}

return  $salida;
}

En esta función hemos utilizado la función get_url_contents descrita en un post anterior sobre optimizacion de file_get_contents en php.

Podemos sacar mucha información del xml de este API http://api.hostip.info/get_xml.php?ip=200.147.3.156

<HostipLookupResultSet version=»1.0.1″ xsi:noNamespaceSchemaLocation=»http://www.hostip.info/api/hostip-1.0.1.xsd»>
<gml:description>This is the Hostip Lookup Service</gml:description>
<gml:name>hostip</gml:name>
−
<gml:boundedBy>
<gml:Null>inapplicable</gml:Null>
</gml:boundedBy>
−
<gml:featureMember>
−
<Hostip>
<ip>200.147.3.156</ip>
<gml:name>(Unknown city)</gml:name>
<countryName>BRAZIL</countryName>
<countryAbbrev>BR</countryAbbrev>
<!– Co-ordinates are unavailable –>
</Hostip>
</gml:featureMember>
</HostipLookupResultSet>

El nodo sobre el que hemos realizado las comprobaciones es countryAbbrev aunque se podría utilizar countryName, aunque siempre vamos a usar menos recursos si comparamos abreviaturas que cadenas de nombres más largas.

Ojo, esta función no es recomendable utilizarla cada vez que tenemos una hit .. ya que ralentizaría nuestra maquina de manera injustificada. Asi que lo que recomiendo es utilizarla unicamente en la primera visita a nuestra web. Esto lo podemos controlar con sesiones, cookies, referer, etc … nosotros hemos utilizado el referer del usurio aunque otras opciones serían igualmente válidas.

Posted in: Internet, Programacion / Tagged: geoip, php, Programacion

optimizar tiempos de file-get-contents en php

abril 5, 2010 1:02 pm / 1 Comment / David Rodriguez

A veces tenemos que cargar xml o contenido externo a nuestra web.

En php, tenemos la función file-get-contents para leer un fichero y devolver un string. En ese caso, podemos tener diferencia de tiempos de carga entre ejecutar un xml en el navegador .. y cargar ese xml en un string.

Esto puede ser debido a las politicas de seguridad de los servidores donde cargamos la información.

Para reducir estos tiempos y que nuestra web no se ralentice, es mejor cambiar esa función por esta otra que nos definimos nosotros a través del método curl.

function get_url_contents($url){
$crl = curl_init();
$timeout = 25;
curl_setopt ($crl, CURLOPT_URL,$url);
curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout);
$ret = curl_exec($crl);
curl_close($crl);
return $ret;
}

Tenemos mejoras en tiempos de un 75% menores en la carga.

Posted in: Internet, Programacion / Tagged: php, Programacion

Problemas con tildes y acentos en el Subject utilizando HtmlMimeMail

marzo 29, 2010 9:31 am / Leave a Comment / David Rodriguez

Encontramos un bug en la clase HtmlMimeMail, donde si utilizabas dos palabras seguidas con tildes en el asunto del mensaje a enviar, el programa juntaba ambas palabras.

Esto pasaba por la codificación de caracteres que se puede ver con este ejemplo:

Asunto: … Carné de Especialista en Instalación de Tuberías Plásticas …

La codificación de caracteres enviada era la siguiente:

Subject: =?ISO-8859-1?Q?Carn=E9?= de Especialista en =?ISO-8859-1?Q?Instalaci=F3n?= de =?ISO-8859-1?Q?Tuber=EDas?= =?ISO-8859-1?Q?Pl=E1sticas?=

Donde podemos observar que el espacio entre esas palabras no lo codificaba bien.

Para solucionar este problema, simplemente hay que hacer los siguientes cambios en la función _encodeHeader de la clase htmlMimeMail:

function _encodeHeader($input, $charset = ‘ISO-8859-1’) {
preg_match_all(‘/(\w*[\x80-\xFF]+\w*)/’, $input, $matches);
$codex = 0 ;
foreach ($matches[1] as $value) {
$codex = 1;
$replacement = preg_replace(‘/([\x80-\xFF])/e’, ‘»=» . strtoupper(dechex(ord(«\1»)))’, $value);
$input = str_replace($value, ‘=?’ . $charset . ‘?Q?’ . $replacement . ‘?=’, $input);
}
if ($codex==1)
$input = str_replace(‘ ‘,’=?’ . $charset .  ‘?Q?’ . ‘=20’ . ‘?=’, $input);
return $input;
}

De esta forma solucionamos el problema. Hemos encontrado la solución en esta pagina.

Posted in: Internet, Programacion / Tagged: htmlMimeMail, php, Programacion

Activolution, ya tenemos oficinas en Sao Paulo

marzo 22, 2010 10:33 am / Leave a Comment / David Rodriguez

Tal y como se comenta en el blog de activolution ya tenemos oficinas en Brasil. El modelo de negocio que exportamos allí es bastante poco conocido en brasil, y estamos seguros que va a ser un exito seguro. Si eres un centro de formación, una franquicia o quieres expandirte en brasil con campañas de marketing online .. no dudes en ponerte en contacto con nosotros.

Posted in: Empresas, Internet, marketing / Tagged: activolution, franquicias, marketing, marketing formacion, marketing online

Optimizacion de consultas sql con lower y trim

febrero 19, 2010 12:01 pm / Leave a Comment / David Rodriguez

Muchas veces utilizamos para buscar algún campo String en una base de datos MySql, confirmamos con lower y trim para poner todo el texto en minúsculas y eliminar espacios en blanco, tanto el principio como al final del registro.

SELECT * FROM tabla WHERE lower(trim(email))=lower(trim(‘[email protected]’));

Eliminar esas funciones sql en MySql reduce la consulta en un 70% con un número alto de registros.

La mejor solución para esto es:

  1. Introducir los datos con esas opciones ya realizadas. Facilmente en php o cualquier otro lenguaje de programación podemos realizar estas funciones, con un uso de máquina mucho menor.
    $email = strtolower(trim($email));
  2. actualizar todos los datos de la tabla para no tener estos problemas en un futuro
    UPDATE tabla SET email=lower(trim(email));
  3. Ya se puede eliminar estas funciones de la consulta(query).
    SELECT * FROM tabla WHERE email=’[email protected]’;

Es importante reducir el uso de CPU por parte de las consultas a base de datos, que es lo que nos puede retardar las respuestas al cliente. Como siempre hemos comentado, es muy importante optimizar las sentencias SQL para optimizar los tiempos de respuesta de la pagina web. Hay muchas cosas además de Indexar las tablas para optimizar una base de datos mysql.

Posted in: Base de datos, Internet, Programacion / Tagged: Base de datos, mysql, SQL

actualizacion Pagerank PR de google en febrero de 2010

febrero 11, 2010 9:28 am / 2 Comments / David Rodriguez

De nuevo google, ha hecho actualizaciones en su PageRank y nos ha tratado bien en las paginas que gestionamos.

↑ PR 3 www.academiasenacoruna.com
↑ PR 3 www.academiasenalicante.com
↑ PR 3 www.academiasenbarcelona.com
↑ PR 3 www.academiasenbilbao.com
↑ PR 3 www.academiasenmadrid.com
↑ PR 3 www.academiasenmalaga.com
↑ PR 3 www.academiasensevilla.com
↑ PR 3 www.academiasenzaragoza.com
↑ PR 3 www.academias-valencia.com
↑ PR 4 www.akademias.com
↑ PR 4 www.blogdellibro.com
↑ PR 3 www.diariodeunfranquiciado.com
↑ PR 3 www.formacionsubvencionada.com
↑ PR 4 www.franquiciando.com
↑ PR 2 www.franquiciasalimentacion.com
↑ PR 2 www.franquiciasautomoviles.com
↑ PR 2 www.franquiciasbebes.com
↑ PR 2 www.franquiciasbelleza.com
↑ PR 2 www.franquiciascafeterias.com
↑ PR 2 www.franquiciascervecerias.com
↑ PR 2 www.franquiciasclimatizacion.com
↑ PR 2 www.franquiciasdecoracion.com
↑ PR 2 www.franquiciasdeportes.com
↑ PR 2 www.franquiciasfastfood.com
↑ PR 2 www.franquiciasfinanzas.com
↑ PR 2 www.franquiciasformacion.com
↑ PR 2 www.franquiciasgimnasios.com
↑ PR 2 www.franquiciasguarderias.com
↑ PR 2 www.franquiciasheladerias.com
↑ PR 2 www.franquicias-informatica.com
↑ PR 2 www.franquicias-inmobiliaria.com
↑ PR 2 www.franquiciasitalianos.com

ahora esperamos pegar el salto de calidad y conseguir los pagerank 5 y 6 que son los que se nos atragantan.

Posted in: Internet, marketing, SEO / Tagged: google, pagerank, posicionamiento google

Post Navigation

« Anterior 1 … 3 4 5 6 7 … 14 Siguiente »

Categorias

  • Base de datos
  • Empresas
  • Entrevistas
  • Internet
  • Mac
  • marketing
  • Otros
  • Prensa
  • Programacion
  • Redes Sociales
  • Retos deportivos
  • Seguridad
  • SEO
  • servidores
  • SPAM
  • Uncategorized
© Copyright 2026 - Blog de David Rodriguez