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:


$filepath = $_GET['image'];

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

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

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


$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: 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



see your pmb please

1 gün içinde %selectedBids___i_sum_sub_4%%project_currencyDetails_sign_sub_5% USD
(45 Değerlendirme)

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


Professional and Original Work Guaranteed!

in %bids___i_period_sub_35% gün içinde50%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)