Mashhadi
Mashhadi

Reputation: 3024

How to upload image without any php script?

please tell me can i upload image from iphone without using php or .net script. i found a code of php

<?php
$uploaddir = '/myappname/uploads/';
$file = basename($_FILES['userfile']['name']);
$uploadfile = $uploaddir . $file;

if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
        echo "http://www.mycompanywebsite.com/myappname/uploads/{$file}";
}

?>

by hitting URL i think image will be uploaded but can i upload without help of server side script?

Waiting for your kind reply :)

Upvotes: 0

Views: 1168

Answers (2)

dynamic
dynamic

Reputation: 48091

You can't upload a file to your server/hosting without PHP. (Or some other server side script).

If that would be possibile I could deface every site on the net

Upvotes: 1

dredful
dredful

Reputation: 4388

There is a way to upload a photo from the iPhone without using server side script. You could FTP the photo. You would need your server to be an FTP server. Not the most secure thing in the world, but technically all the work is done on the phone side without server side code.

FTP sample code

Upvotes: 1

Related Questions