Solved

A Simple Chat Program using Proxy Server to connect

Posted on 2000-02-13
2
172 Views
Last Modified: 2010-04-04
I wonder if it is possible to create a connection through a Proxy server in the standard internet Components available in Delphi. If it is so, please let me know :o)

Thanx ...
0
Comment
Question by:subrek
2 Comments
 

Accepted Solution

by:
ellessar earned 50 total points
ID: 2517813
Yes you can:

<snippet from delphi 5 help file>

To recreate this example, you will need to create a new blank Delphi application

*NOTE*
If you do not use a proxy server at your current location, you will not be able to use this example. If you are not sure if you are using a proxy server or not, ask your network administrator.

Place a TButton, 2 TEdits, a TMemo, and a TNMHTTP on the form.

Insert the following code into Button1's OnClick event:

procedure TForm1.Button1Click(Sender: TObject);
begin
  if (Edit1.Text <> '') and (Edit2.Text <> '') then
  begin

    NMHTTP1.Proxy := Edit1.Text;
    NMHTTP1.ProxyPort := StrToInt(Edit2.Text);
  end;
  NMHTTP1.Get('http://www.netmastersllc.com');
  Memo1.Text := NMHTTP1.Body;
end;


<end snippet>
0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 2517879
Listening
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

914 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now