Encerrado

Write a cURL script to automatically transfer file to FTP site each night

We have a need to automatically upload a file to an FTP site on a nightly or weekly basis. The file needs to be uploaded through a cURL script. Here are the instructions provided to us.

To upload subscription data from a file using a command-line interface, follow this general procedure:

1. Set up a license in the Admin Tool for your Person identity to access the directSubscriptionUpload

content slice (Section 5.1 - see below).

2. Create the upload file in the specified format (Section 5.2 - see below).

3. Create a cURL cookies file (Section 5.3 - see below).

4. Upload the file using an upload utility that can send HTTPS POST messages, such as cURL

(Section 5.4 - see below).

5. Check the status of the file upload and processing (Section 5.5 - see below).

Before you begin, set up an HTTPS POST utility (such as cURL). To download a version of cURL

appropriate for your operating system (use the non-SSL version), refer to:

[url removed, login to view]

Note: Our Operating System is Windows Server 2003.

5.1. Set Up a License

This procedure only needs to be done once.

1. Create a Person identity.

If needed, create a Person identity, including username and password, for the user performing the

direct subscription upload.

2. Create a Service content slice.

a. In the Admin Tool, click the Content Slices sidebar button and select Service from the Content

Type drop-down.

b. Enter directSubscriptionUpload in the Service Name field and click Search.

c. If no results are found, click OK, enter a description of the service in the Description field, and

click Create.

3. Create a license.

a. In the Admin Tool, click the Licenses sidebar button and click into the Create One-off Licenses

panel.

b. Create a license using the directSubscriptionUpload content slice and the Person identity

created above (refer to the Licenses User Guide).

5.2. Create the Subscription Upload File

Create a subscription upload file in the custom format required for your platform (Section 2.7).

5.3. Create a Cookies File

Create a cookies file with cURL login information. For example:

curl -c [url removed, login to view] -b I2KBRCK=1 -d login={username} -d password={password} https://

{host}/action/doLogin

where {username} and {password} are the attributes of the Person identity, and {host} is the Literatum

website. This command stores the session cookies in cookies.txt.

This only needs to be done once per session.

5.4. Upload the Subscription File

Next, use a web form or a command-line HTTPS utility such s cURL to make a POST call to the upload

URL.

Assuming you have created a cookies file named [url removed, login to view], upload the subscription file using the

following command:

curl -b [url removed, login to view] -F file1=@C:\{uploadFile}.txt -F format={subscriptionFileFormat} -F

email={myEmailAddress} https://{host}/action/directSubscriptionUpload

where you replace:

• {uploadFile}.txt with the name of the upload file. Include the @ (at) symbol and the directory path

of the file.

• {subscriptionFileFormat} with the subscription file format name as found in the Admin Tool (in

the File Format drop-down menu). If the format name contains spaces, enclose the name in double

quotes (e.g., "Eclipse Institutional Subscriptions").

• {myEmailAddress} with the email address to which notification of the status of the subscription

upload should be sent.

• {host} with the URL of your website.

For example:

curl -b [url removed, login to view] -F file1=@C:\Users\BJohnson\[url removed, login to view] -F format="Eclipse

Institutional Subscriptions" -F email= [url removed, login to view]

action/directSubscriptionUpload

5.5. Direct Subscription Upload Status

If an error occurs while posting to the direct subscription upload service, an email is sent to all email

addresses specified in the command. Any errors that occurred during processing of the subscription file

can be viewed in the Admin Tool (see Chapter 4).

The direct subscription upload service returns 200 OK if the POST is successful and 500 if an error

occurred.

Habilidades: Comércio eletrônico

Ver mais: you need to write a description, write for us 200, windows action script, url download tool, transfer url, notification utility, name transfer, name com transfer, html 5 eclipse, ftp upload utility, from where we can write a content to our website, file download service, enter your email address in the format, ecommerce website for 500, direct file upload, c# call web service https, address write, type of cookies, write instructions, Write chapter 2, procedure of create website, post a service, make a site https, call to action form, automatically

Acerca do Empregador:
( 14 comentários ) Woodstock, United States

ID do Projeto: #5118825

2 freelancers estão ofertando em média $178 para este trabalho

dinastalb

Hello, I am John Profit. I work with my partners Marlen and Van at Netronian Inc., in Orlando, Florida. We have great experience with Magento. 80% of our developed websites are Magento websites. We are the masters Mais

$741 USD in 15 dias
(20 Comentários)
6.3
SigmaVisual

Dear Client, I can help in your project. We have already experience of working on similar projects. Please see below to get idea of our experience: Amazon/Ebay Bots: [url removed, login to view] Mais

$206 USD in 5 dias
(6 Comentários)
4.6
sxi

A proposal has not yet been provided

$150 USD in 3 dias
(1 Comentário)
1.4
irshaa

Hi There, :) Thanks for taking a minute to read my profile brief. I have just read your requirements and want to work with you. Here is Some REASONS WHY YOU SHOULD HIRE ME. I have full time working experi Mais

$247 USD in 3 dias
(0 Comentários)
0.0