Devam Ediyor

Simple PHP Code Modification

I'm a total novice to PHP coding...

My website utilizes a PHP download script to obtain high-resolution photos from a gallery.

I'm hosting the gallery on my shared hosting server and am storing the high-resolution copies on Amazon S3. As the script reads now, the download link pulls the high-res copy from the gallery's directory on my shared hosting...

I need it to pull from the Amazon S3 account instead.

Here's the existing script:

<?php

$filepath = $_GET['image'];

if (substr($filepath, 0, 1) != '.' && substr($filepath, 0, 1) != '/' && strpos(strtolower($filepath), '.jpg') != false) {

$file = '../'.$filepath;

$filearray = explode("/",$file);

$ctype="image/jpg";

$arraylength = count($filearray);

$filename = $filearray[$arraylength-1];

if (!file_exists($file)) {

die("no file here, sorry...");

}

header("Pragma: public");

header("Expires: 0");

header("Cache-Control: must-revalidate, post-check=0, pre-check=0");

header("Cache-Control: private",false);

header("Content-Type: $ctype");

header("Content-Disposition: attachment; filename=\"".basename($filename)."\";");

header("Content-Transfer-Encoding: binary");

header("Content-Length: ".@filesize($file));

@readfile("$file") or die("File not found.");

} else {

die("looking for an image?!");

}

?>

I need someone who can modify the script for me to pull from an Amazon S3 account instead of the shared hosting account where the gallery is located.

Beceriler: Amazon İnternet Servisleri, PHP

Daha fazlasını görün: simple binary code, simple binary, services photos, photos services, novice to, novice novice, code coding, server code, amazon web services s3, web die, type code, simple header, simple account, php services, php code, modify code, copy code, code check, amazon web hosting, amazon copy, private image hosting script, php post binary, content disposition, amazon pull, php simple coding

İşveren Hakkında:
( 4 değerlendirme ) Chisago City, United States

Proje NO: #700978

Seçilen:

ta3k

see your pmb please

1 gün içinde 30$ USD
(45 Değerlendirme)
5.0

2 freelancer bu iş için ortalamada 40$ teklif veriyor

Looping

Professional and Original Work Guaranteed!

in 2 gün içinde50$ USD
(0 Değerlendirme)
0.0