Convert PHP 4 script to 5.4 Multiple files to convert. $10-30 USD Опублікований over 10 years ago
$10-30 USD Оплачується при отриманні
We have specific php files that function to send an email to us and to our customers, along with an image. We have recently updated our server and need to update the coding to match the php 5.4. We have 27 of these, most of which are very similar. Depending on the work performed, you may have more to do for additional charge in the future.
Please do not bid if you have no feedbacks. We would prefer to use a US based coder for timeframe convenience.
Finished product must work with our current system, takeing all variables and passing them to the email
Here is an abridged version of of it for review.
<?php
ini_set("display_errors","1");
error_reporting (E_ALL);
require_once '[login to view URL]';
require_once 'Mail/[login to view URL]';
// retrieve request parameters
$enteredText = $_REQUEST["text"];
$width = $_REQUEST["width"];
$height = $_REQUEST["height"];
$length = $_REQUEST["length"];
$email = $_REQUEST["email"];
$bitmap = $_REQUEST["bitmap"];
$font = $_REQUEST["font"];
$sizeV = $_REQUEST["sizeV"];
$sizeH = $_REQUEST["sizeH"];
$effect = $_REQUEST["effect"];
$effectColor = $_REQUEST["effectColor"];
$mainColor = $_REQUEST["color"];
$price = $_REQUEST["price"];
$qty = $_REQUEST["qty"];
$comments = $_REQUEST["comments"];
$slanted = $_REQUEST["slanted"];
if (!$bitmap) {
exit(-1);
}
// unzip bitmap string
$bitmap = base64_decode($bitmap);
$bitmap = gzuncompress($bitmap);
// create and save image under [login to view URL]
$newImage = imagecreatetruecolor ($width, $height);
for ($i = 0; $i < $height;$i++) {
for ($j = 0; $j < $width;$j++) {
$index = $i * $width + $j;
$red = hexdec(bin2hex(substr($bitmap,4 * $index + 1, 1)));
$green = hexdec(bin2hex(substr($bitmap,4 * $index + 2, 1)));
$blue = hexdec(bin2hex(substr($bitmap,4 * $index + 3, 1)));
$color = imagecolorallocate($newImage, $red, $green, $blue);
imagesetpixel($newImage, $j, $i, $color);
}
}
$filename = "images/xxxxxx_design" . rand() . ".jpg";
imagejpeg($newImage, $filename, 100);
$from = "<" . $email . ">";
$to = "Edecals <>, Customer <" . $email . ">";
$subject = "xxxxxxxxx Image";
$text = 'xxxx. email.' . '<BR>'. '<BR>';
$text .= 'Text: ' . $enteredText . '<BR>';
$text .= 'Font: ' . $font . '<BR>';
$text .= 'Slant: ' . $slanted . '<BR>';
$text .= 'Color: ' . $mainColor . '<BR>';
$text .= 'Effect: ' . $effect . '<BR>';
$text .= 'Effect color: ' . $effectColor . '<BR>';
$text .= 'Height: ' . $sizeV . '<BR>';
$text .= 'Width: ' . $sizeH . '<BR>';
$text .= 'Quantity: ' . $qty . '<BR>';
$text .= 'Price: ' . $price . '<BR>';
$text .= 'Comments: ' . $comments . '<BR>'. '<BR>';
$host = "[login to view URL]";
$port = "25";
$username = "";
$password = "xxxxxxxx";
$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$mime = new Mail_mime("\n");
$mime->setHTMLBody($text);
$mime->addAttachment($filename);
$body = $mime->get();
$headers = $mime->headers($headers);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'port' => $port,
'auth' => true,
'username' => $username,
'password' => $password));
$mail = $smtp->send($to, $headers, $body);
// unlink($filename);
?>
ID проекту: 5166001
Про проект 4 пропозицій(-ї)
Дистанційний проект
Активність 9 yrs ago
Хочете заробити? Email Подати заявки на схожі роботи Переваги подання заявок на Freelancer Вкажіть свій бюджет та терміни
Отримайте гроші за свою роботу
Реєстрація та подання заявок у проекти є безкоштовними
4 freelancers are bidding on average $84 USD for this job
skilled php developer here, let do the conversion now. skilled php developer here, let do the conversion now.
$30 USD за 2 дні(-в)
5,0 (149 відгуки(-ів)) Hi
My bid is for all 27 php mailer scripts.
Will be ready in 1-2 days.
Just fixed the javascript version, it works again.
Ati
$250 USD за 2 дні(-в)
5,0 (11 відгуки(-ів)) Hi
I a software engineer and expert in Web development
Expert CSS,HTML/HTML5,JQuery,AJAX,javascript
I have worked in Frameworks
for reference you can view my portfolio
I asure you for the 100% completion rate and quality results
thanks
$25 USD за 0 день
5,0 (1 відгук) hi, im ready to do you the first part of project for free. The reason of that is im a new freelancer and i need gain prestige to find some employer continuously. if you are willing to give me more work, or you can give me a good recommendation, I can do the project for you. [Removed by Freelancer.com admin; exchanging of contact information is prohibited unless the project is already awarded.]
$25 USD за 1 день
0,0 (0 відгуки(-ів))