473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to programmatically transfer a file from linux php server to windows .net server?

So I have a bit of an issue. I need to make it so that files are automatically transferred from one server to another. The originating server using a linux OS and runs an php web application. The second uses a windows OS and runs ASP.NET 2.0 applications most written in C#. It is not an option to install php on the windows servers. The two servers do not have visibility of one another.

I'm considering writing a webservice in ASP.NET that can be called from PHP, passing the needed file as a parameter. Unfortunately, I'm not sure how (or if) I can pass a file from PHP that can be read through an ASP.NET language (such as C#).

Can anyone give me some advice?
Jul 19 '10 #1
8 3755
dlite922
1,584 Expert 1GB
is it a text file or binary file?
Jul 19 '10 #2
They will be powerpoint files; so, binary.
Jul 19 '10 #3
chathura86
227 100+
yes a web service can be used to transfer the file, encode the file as base64 or similar and decode it in the C# and save it

or if you can create a file upload form in C# and submit that form from PHP (Snoopy will help you)

as the third you can also use FTP (FTP server in windows and client in php server)

Regards
Jul 20 '10 #4
@chathura86
Thanks chathura.

The file upload form isn't a possibility, since lots of information is posted to a php page in the same action that I need this file transferred.

I'm curious about the FTP solution. It still may not work since there isn't visibility of each other. Can you point me towards more information?
Jul 20 '10 #5
Oralloy
988 Expert 512MB
Just how do your servers communicate in the first place?

If they can't connect using IP sockets, are you relying on SOAP communications, or something else?

Basically all the "standard" communications methods are already canned and readily available.

Can you tell us what communications paths are available?
Jul 20 '10 #6
chathura86
227 100+
@Ricky Brooks
The file upload form isn't a possibility, since lots of information is posted to a php page in the same action that I need this file transferred.
yes you can execute those actions and let the php script to upload the file (not by using a form in the php site which submit to the .net site)
any way you cannot do anything without visibility to each other. you need to have a way to pass a message from one server to another. a ip, domain or any other

Regards
Jul 21 '10 #7
When I say they don't have visibility, I mean I can't type in a network path to copy files directly from the windows machine to linux, or vice-versa. I am able to use ftp programs to do this, however.

It's probably become obvious at this point that OS and network setups are not my speciality. I'm not entirely sure how things are set up. Perhaps I'll talk with my systems team for more informaiton.
Jul 21 '10 #8
Oralloy
988 Expert 512MB
If the windows server is running FTP, perhaps your best bet is FTP.

Use an FTP client object or shell off an FTP script on your Linux system, depending on what works best for your needs.

Alternately, if the Linux you are using is a later version, it may already have drivers for windows networking built in. In this case, you should be able to get into network shares on the windows box from the file browser.

As a last resort, you could build an applet on the windows machine and use HTTP to transfer the file from php - but that seems like way too much work.
Jul 21 '10 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: heyitsme_ryan | last post by:
Ei guys I’m Ryan from Philippines, I need your advice and recommendations about Windows 2003 Server and SQL Server 2000 installation. Well, here’s the scenario. First is for windows 2003 server:...
1
by: rfroli | last post by:
Hi, After installing Windows SP2, I receive an internal compiler on a pch file when trying to compile a C++ project on VS.Net 2003. The pch file was built before the installation of SP2.
7
by: TJS | last post by:
does asp.net have server to server file transfer (upload) capability ?
7
by: Wade Wegner | last post by:
Hello, I have been desperately trying to programmatically authenticate a windows user, create their credentials, and then redirect them to a different server while passing the credentials at the...
6
by: jake | last post by:
How do you get or save a file from/to a client (button on web page) once they are authenticated? The client could be Mac, Linux or Windows. Can I do it all with IIS and ASP.NET?
4
Niheel
by: Niheel | last post by:
What do you think is the best operating system for web servers? Linux or Windows? Why do you prefer one over the other? I prefer linux. I think it's because everything else we use in our company...
1
by: =?Utf-8?B?QW50amU=?= | last post by:
I need product keys for Terminal Server Windows Server 2008 access (CALs) under MSDN - TSLM Service said they cannot provide product keys for the access.
2
by: rameshvummadi | last post by:
Hi, I want to transfer a file from ny unix server to windows server. But FTP service is not available on my windows server. Is it possible to transfer a file with out FTP service running on the...
8
by: sganeshsvk | last post by:
sir, i want to transfer the file and folders from Linux OS to WindowsXP OS... plz send Linux Command for transfer file and folders from Linux OS to WindowsXP OS ...
0
by: sganeshsvk | last post by:
sir, i want to transfer the file and folders from Linux OS to WindowsXP OS... plz send Linux Command for transfer file and folders from Linux OS to WindowsXP OS ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.