Using a pre-existing PHP script to upload images to a server
I'm creating a winform application where I need to upload image files to a
central image server. Before this, there is a pre-existing php script that
has been written to allow images to be uploaded to the server via a web
portal. I've also been told that I can make my program access this PHP
script and use its functionality.
How is that possible?
So far what I've tried is the following lines of code:
IPHostEntry ipHostInfo =
System.Net.Dns.GetHostEntry("http://scriptlocation.html");
IPAddress ipAddress = ipHostInfo.AddressList[0];
using (TcpClient client = new TcpClient())
{
client.Connect(ipAddress, 21);
client.SendTimeout = 3000;
var status = client.Connected;
lblStatus.Text = status.ToString();
Console.WriteLine(status);
}
But when I run this I get the following error;
No such host is known
I'm really new to network programming like this, could someone please
point me in the right direction?
No comments:
Post a Comment