Find Jobs
Hire Freelancers

Automatic Piping and Extraction of Email Attachment to a Database in PHP

$30-100 USD

En curso
Publicado hace alrededor de 16 años

$30-100 USD

Pagado a la entrega
I would like to pipe an incoming email through a PHP script automatically,? extract the email attachment and drop the contents of the attachment into a mySQL database. ## Deliverables I would like a PHP script which automatically extracts an attachment from an incoming email and dumps the contents of the attachment into an existing mySQL table. I already know about using ".forward' containing "|/my path", it's just the script itself I need. The incoming emails of concern will have an attachment. The name of the attachment is important. The name of the attachment will be in the form: ABCDEF_20080412_12345 and contains ASCII text. The ASCII text is in CSV format.? The only important part of the attachment name is the "ABCDEF" part. This is a variable length prefix (usually 4 to 6 characters)? , but this means the underscore will have to be exploded rather than a fixed number of characters used. At the top of the script? I will need? some type of? array to list the "allowed" values for the email attachment name. If the extracted attachment name prefix (ABCDEF etc) is not in the allowed list, then the email and attachment must not be processed. Also, if there is no attachment, the email should? not be processed through the rest of the script as this will probably be spam email. Once the prefix of the name of the attachment (ABCDEF etc) is found and validated, this prefix plus an extra comma (,)? needs to be appended to the beginning of every line of the attachment before it is written into the mySQL database/table. The following variables will need to be declared at the top of the PHP so I can edit them: $db_host = "localhost"; $db_name = "xxxxx"; $db_usr = "yyyyyy"; $db_pwd = "zzzzzz"; $db_table = "alt_text"; The variable $db_table name is the name of the table to finally write the data into. The data needs to be written in "append" form, so that any existing data in the table remains unaffected. So here's an example: If an email arrives with an attachment named [login to view URL] and TEST is an allowed prefix and the attachment? contains the following data: APPLE,20080411,56.15,57.48,56.07,56.19,1500800 ORANGE,20080411,22.19,22.82,22.12,22.64,41100 PEAR,20080411,28.08,28.08,27.13,27.28,915200 ...then the following will be written into the table called "alt_text": TEST,APPLE,20080411,56.15,57.48,56.07,56.19,1500800 TEST,ORANGE,20080411,22.19,22.82,22.12,22.64,41100 TEST,PEAR,20080411,28.08,28.08,27.13,27.28,915200 .... .... etc... There can be anything from a few dozen to several thousand lines in the attachment. If you have any questions, drop me an email and I'll reply as soon as I can.
ID del proyecto: 3864534

Información sobre el proyecto

6 propuestas
Proyecto remoto
Activo hace 16 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
See private message.
$72,25 USD en 5 días
5,0 (29 comentarios)
4,8
4,8
6 freelancers están ofertando un promedio de $170 USD por este trabajo
Avatar del usuario
See private message.
$680 USD en 5 días
5,0 (33 comentarios)
5,3
5,3
Avatar del usuario
See private message.
$68 USD en 5 días
5,0 (38 comentarios)
5,2
5,2
Avatar del usuario
See private message.
$68 USD en 5 días
5,0 (39 comentarios)
5,2
5,2
Avatar del usuario
See private message.
$85 USD en 5 días
4,5 (25 comentarios)
4,9
4,9
Avatar del usuario
See private message.
$46,75 USD en 5 días
4,8 (7 comentarios)
3,4
3,4

Sobre este cliente

Bandera de UNITED KINGDOM
United Kingdom
5,0
49
Forma de pago verificada
Miembro desde jun 8, 2005

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.