Em Andamento

sample php scripts for fileupload and transfer to photoservi

Hi php folks (sorry, posted a little to high budget),

we need some really easy php pages. Actually we think it's roughly two hours work...

First page: upload some pictures to a the webserver

(Detail:

- choose local pics,

- create destination folder,

- choose destination folder,

- upload)

Second page: show pictures with checkbox to transfer to online photoservice

(Detail:

- choose folder,

- show all pics from folder,

- each pic with a checkbox,

- transfer choosen pics to photoservice as anonymous customer )

- transfer choosen pics to photoservice as known customer

Documention from the photoservice:

The first step is a simple session request. Later on all uploaded pictures are marked with this ID, so that all of them can be assigned to the correct customer and shopping cart and no customer can see pictures of other people. The photos are being uploaded to the inbox of the customer, so that they can be moved to an online album or ordered directly. These session IDs can be used only for the API.

To get such a session ID there are two possibilities.

a) Upload for an anonymous customer:

Here, the URL https://www.domain.com/uploadApiSessionRequest/<1>/<4> is used

b) Upload for specific customer:

https://www.domain.com/uploadApiSessionRequest/<2>/<3>/<4>

Meaning of the placeholders:

<1>: Skin-ID. This value is used for the internationalisation. Language, currency, measurements are set up via this method.

<2>: User name or email address of the customer

<3>: MD5 encrypted upload pin of the customer

<4>: With this unique key the external partner is identified.

In the case of success, the answer to this request has the following format:

error=0

uploadurl=[url removed, login to view];token=def

In the case of an error, the answer includes an errorcode. Have a look at chapter 4 to see them all.

The URL given at uploadurl is used in chapter 3. for the upload. Images are sent to it.

3. Upload Images

The Upload Image request is used to send the binary photo data together with the Session-ID. The Upload Image request will be a multipart HTTP POST

(multipart/form-data). The form data may contain the following form-data elements (content-type: text/plain; charset=utf8):

Name Value token The same token as in the Session Request sessionToken “ “

In addition, the form data will contain one image file (usually content-type: image/jpeg): name="ImageData" filename="[the filename]"

RESPONSE:

In the case of a successful upload, the server should respond with something like:

HTTP/1.0 200 OK

Content-Type: text/plain

error=0

clickurl=[URL]

where:

[URL] represents a URL the customer can call to get to the photos at the photoservice.

Due to security reasons this link can be used only once, otherwise an error code will be send!

In case of a failed upload, the server responds with:

HTTP/1.0 200 OK

Content-Type: text/plain

error=[errorcode]

where:

[errorcode] is one of the errors defined in chapter 4, error codes. If the error is a fatal error, the upload should be aborted. If the error is nonfatal (eg 'image too large'), the client should proceed with the next image.

Note: All images must be > 50kb and < 50mb.

4. Error Codes

code description

-5 image too small

-4 image too large

-3 invalid filetype

-2 login incorrect

-1 login required

0 ok

1 invalid session ID

2 user quota exceeded

3 service unavailable

4 bad request

5 unknown token

6 missing skin_id

7 invalid sessiontoken

8 link to photoservice already used

Errorcodes < 0 are nonfatal, codes > 0 are fatal.

Script will be completed by us using tokens, id's and domains.

Habilidades: PHP

Ver mais: php fileupload aborted, utf8 codes online, transfer url, email format invalid, think together, simple scripts, simple binary code, simple binary, session php, server scripts, request transfer domain, php service, php description, php codes create form, photo shopping pictures, photo shopping pics, online shopping script php, online photo shopping, multipart form request, lt security, look php, invalid email format, invalid email error, invalid email address format, incorrect address

Acerca do Empregador:
( 5 comentários ) Brühl, Germany

ID do Projeto: #457747

Premiar a:

openwebsolutions

Please check PMB for details.

$75 USD em 2 dias
(18 Avaliações)
4.4

4 freelancers estão ofertando em média $106 para este trabalho

jamalazza

hi let's begin the work

$150 USD em 1 dia
(36 Comentários)
6.1
LeoShag

Hello, I can do this job for you. I have great experience in php and working with images that is why I can do this job in best view. My recent project that suppose work with images is http://myfile.ru - it is soc Mais

$50 USD in 2 dias
(0 Comentários)
1.4
nagchalasani

Hi, Greetings! SQL InfoTech is IT service providers for various customers all over the world with talented pool of resources on PHP and MYSQL. We have gone through your requirement and would like to update that w Mais

$150 USD em 1 dia
(0 Comentários)
0.0