#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    2
    Rep Power
    0

    Need to move and handle file from one server with C# to anoter server with php ?


    I have two websites online i.e. 1st is PM which is developed using asp.net, C# ,sql server and 2nd one is developed using php ,mysql.

    I need to manage data by choosing one website for CRUD operations (asp.net) and on another website(php) the viewer can only view data (nserted by asp.net website).

    as the information viewed is same but on different websites.

    I need to insert persons data with 3 sample files on asp .net website and insert and move info + samples fies to the php website .

    I really dont have any idea to achieve that ,I can use Webclient() to post data to php web but still how can i move files to the php page .

    Need help
  2. #2
  3. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,965
    Rep Power
    9397
    You can't just move files. You have to rewrite the application (the viewing part at least) in PHP.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    2
    Rep Power
    0

    i need to insert and upload the files from C# to php.


    Both application have their own CRUD operation format but user want to enter info on only one application (C# ) and want to view only on PHP...that why i need to insert and upload the files from C# to php.


    Can it be achieved by :

    foreach (var item in filepaths)
    {
    WebClient webclient = new WebClient();
    webclient.Headers.Add("Content-Type", "application/x-www-form-urlencoded");

    byte[] byteArray = Encoding.ASCII.GetBytes(item);
    byte[] responseArray = webclient.UploadData("URL ")", "POST", byteArray);
    string result = Encoding.ASCII.GetString(responseArray);
    }



    and handle the POST data in php to upload n insert data to mysql .. HOw can I achieve this
  6. #4
  7. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,965
    Rep Power
    9397
    Make the C# application save the data (which to some degree will involve some viewing of the data at the same time) and make the PHP application show the data (in a read-only form).

IMN logo majestic logo threadwatch logo seochat tools logo