Solved

In Need of: HTTPS File Upload Script

Posted on 2010-08-23
8
331 Views
Last Modified: 2013-12-13
I am in need of a simple script (.php, .asp) that can send an .xml file to a remote server.
I am transmitting orders to a customer, they require https communication (no ftp), the proper certificates are in place.
Basically, I want to drop a file into a directory on my server and have the script automatically grab the file and send it to a url (their server).
So far, everything I have found requires a form to submit the data.  I cannot use an upload form, the files are dropped in the directory automatically from our warehouse management system.

Can someone point me in the right direction?

Thanks!
0
Comment
Question by:medennis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 9

Expert Comment

by:Snarfles
ID: 33502883
Do you have a ssh connection on both machines? if so you could create a ssh connection from your box to theirs and then use scp to copy the file over. You can just create a perl script to do that and then assign it as a cron job.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 33502975
You have to know how they are going to 'receive' the file.  If they are expecting a 'POST' with a file, then you will have to do it that way or it won't be received.
0
 

Author Comment

by:medennis
ID: 33510752
Yes Dave, they are expecting the file via HTTPS POST.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 33512545
One of your options is using 'curl' in PHP to POST the file to the server.  http://us.php.net/manual/en/book.curl.php  PHP is not normally run in the background as a task but you could set up a periodic task in "Scheduled Tasks" to run it from the command line.  I don't have a script to do what you want but it's probably available.  Is this a Windows or Linux or Mac machine?
0
 

Author Comment

by:medennis
ID: 33514924
It is a Windows Server 2003 using IIS; PHP is installed and working properly on this box.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 33515879
This page appears to have all the pieces, just not put together as you need.  Note the comments about some things not working on some version of PHP.
0
 

Expert Comment

by:jmichaelbrook
ID: 37206725
I am in need of a simple script (.php) that can send an.csv .xml file to a remote server.
I am transmitting orders to a customer, they require http communication (no ftp) and POST, the proper certificates are in place.
I am using shared hosting on a linux platform and intend to use a cron job to initiate the PHP script
Basically, I want to drop a file into a directory on my server and have the script automatically grab the file and send it to a url (their server).
So far, everything I have found requires a form to submit the data.  I cannot use an upload form, the files are dropped in the directory automatically from our warehouse management system.

Can someone point me in the right direction?

Thanks!
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 37208990
@jmichaelbrook, you need to open a new question instead tagging on a closed question.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
2012 SQL to JSON Select 5 31
How to post data to an API using ASP Classic 3 30
syntax error, unexpected '?' in phpunit 5 28
How do I remove "" from json_encode 5 22
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question