get page uses sock in Delphi

Posted on 2005-04-08
Last Modified: 2010-04-05
I want to open and get content of website use socket.
in PHP, I used fsockopen, but in PHP I don't know how do it ??
Please help me :|
Question by:ngocquynh85
    LVL 13

    Expert Comment

    >>in PHP, I used fsockopen, but in PHP I don't know how do it ??

    use fsockopoen

    LVL 13

    Accepted Solution

    just kidding... is simple using the Indy components, something like:

     HTTP := TIdHTTP.Create(FOwner);
    with HTTP do
      Request.UserAgent := 'Mozilla/4.0';
      Request.Connection := 'Keep-Alive';
      Request.ProxyConnection := 'Keep-Alive';
      Request.CacheControl := 'no-cache';

    Stream := TMemoryStream.Create;
    on e:exception do
    //error handling
    LVL 14

    Expert Comment

    No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

    I will leave the following recommendation for this question in the Cleanup topic area:
       Accept: BlackTigerX {http:#13738543}

    Any objections should be posted here in the next 4 days. After that time, the question will be closed.

    EE Cleanup Volunteer

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
    Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    745 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

    16 Experts available now in Live!

    Get 1:1 Help Now