Remote Server Transfer using php

In this tutorial I am going to explain how to transfer large files from one server to another without any time lag.

It is a hell job to download and then upload files while at the time of server transfer.In this we can use an alternative called remote upload.

Most of the servers support remote upload.But in some hosting providers like silliconhouse.net doesn’t support remote file transfer.If it is not supporting the server transfer will be a hell job.

Here is the code for Remote Upload files using Php:

<?php
define('BUFSIZ', 4095);
$url = 'http://www.navaneeth.me/alexa-top-ranks.csv.zip';
$rfile = fopen($url, 'r');
$lfile = fopen(basename($url), 'w');
while(!feof($rfile))
fwrite($lfile, fread($rfile, BUFSIZ), BUFSIZ);
fclose($rfile);
fclose($lfile);
?>

Step 1: First you need to create a file called upload.php where you want to upload the files.
Paste the above code in that file.

Step 2: Replace the url with your url required to be remotely upload.

Step 3 : Run the file upload.php and it will automatically copy your requested files in a fraction of second.

Hope this is helpful for you.
Enjoy the Remote Uploading using php.

Magento Go is Shutting Down

E-commerce platform Magento, owned by eBay’s Enterprise division, is closing down two of its products designed to reach small to medium-sized online retailers: Magento Go and ProStores. The company has posted notices and informational guides on both product websites, directing current customers to “Migration Center” dashboards and various FAQ’s that will help them move their businesses to other platforms. Combined, the two products include around 10,000 merchants.

This is what eBay Enterprise Says

We’ve made the difficult decision to shut down Magento Go on February 1, 2015. Your store will not be affected during the Holiday shopping season – it will continue to operate and perform normally, and Magento will continue to provide customer service until February 1, 2015.

 

Over the past five years we’ve had the opportunity to work with thousands of merchants and have been humbled to be a part of so many success stories. Going forward, we’re focusing our resources on Magento Enterprise Edition and Magento Community Edition, two solutions that better support and better equip small and medium size merchants to prosper in the evolving and increasingly competitive eCommerce landscape.

 

Please be sure to take advantage of the checklists, planning resources and special offers found in the Migration Center to help smooth your transition to a new eCommerce solution.

PayPal Users Must Discontinue Using SSL 3.0

PayPal Users Must Discontinue Using SSL 3.0 By December 3, 2014

To address a vulnerability with the SSL 3.0 security protocol, PayPal and other payment gateways will be disabling SSL 3.0 support. Merchants must upgrade to Transport Layer Service (TLS) by December 3, 2014 to avoid PayPal payment operation failures.

Recently a vulnerability was published that affects a particular version of the Secure Sockets Layer (SSL) protocol, which is used to secure connections to websites. The vulnerability, which only exists in SSL 3.0, allows a cyber criminal to gain access to connections previously assumed secure. Fortunately, SSL 3.0 is not the only option available to secure these connections, and this vulnerability can be prevented by disabling support for SSL 3.0. PayPal will completely disable SSL 3.0 support, which will prevent this vulnerability from impacting users of PayPal, including those who may be using an integration via a merchant’s site.

Whilst disabling this protects users from harm, it may result in compatibility issues for some customers, particularly those merchant sites that rely on SSL 3.0. No need to worry though, updating your integration to be secure and compatible is quick and easy.

Ensuring you are secure is a simple process. If you are currently using SSL 3.0, update to use TLS, a more recent standard than SSL that provides a secure connection. Once you have done so, consider issuing new API credentials; this may not be necessary, but is recommended for security purposes.

If you are unsure whether you are using SSL 3.0 all you need to do is test your integration against the Sandbox. If you can make an API request, you are not using SSL 3.0, as this has already been disabled on the PayPal Sandbox, and you will experience no compatibility or security issues. If you are unsure how to test your integration against the Sandbox, please refer to the Merchant Response Guide for more details.

Read more at Poodle SSL 3.0 Vulnerability

For additional information about the POODLE vulnerability and PayPal’s response, please see this blog post from PayPal CTO, James Barrese.

Send Email with Attachment in PHP

In this post i am showing you how you can send email with attachment in php. For time being we are using a pdf file as attachment that created using FPDF.
so first we need to create and sample pdf using the fpdf library which can be downloadedby clicking here

See code below to see how we can send email with attachment in PHP

//creating a sample pdf file
require('fpdf.php');
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World!');

$to = 'hello@navaneeth.me';
$from = "no-reply@hello.navaneeth.me";
$message="Test email with attachment";
// a random hash will be necessary to send mixed content
$separator = md5(time());

// carriage return type (we use a PHP end of line constant)
$eol = PHP_EOL;

// attachment name
$filename = 'sample_data.pdf';

// encode data (puts attachment in proper format)
$pdfdoc = $pdf->Output("", "S");
$attachment = chunk_split(base64_encode($pdfdoc));

// main header
$headers= "From: Navaneeth.me <".$from . ">".$eol;

$headers .= "MIME-Version: 1.0".$eol;
$headers .= "Content-Type: multipart/mixed; boundary=\"".$separator."\"";

// no more headers after this, we start the body! //

$body = "--".$separator.$eol;
$body .= "Content-Transfer-Encoding: 7bit".$eol.$eol;
$body .= "".$eol;

// message
$body .= "--".$separator.$eol;
$body .= "Content-Type: text/html; charset=\"iso-8859-1\"".$eol;
$body .= "Content-Transfer-Encoding: 8bit".$eol.$eol;
$body .= $message.$eol;

// attachment
$body .= "--".$separator.$eol;
$body .= "Content-Type: application/octet-stream; name=\"".$filename."\"".$eol;
$body .= "Content-Transfer-Encoding: base64".$eol;
$body .= "Content-Disposition: attachment".$eol.$eol;
$body .= $attachment.$eol;
$body .= "--".$separator."--";

// send message
mail($to, $subject, $body, $headers);

If the code doesnt works for you have an issue regarding the emails,For some servers the inboud or outbound email address must be an email within server address
Hope it helps you to send email with attachment in php