Results 1 to 8 of 8

Thread: PostHTTPPage etc. in delphi

  1. #1
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default PostHTTPPage etc. in delphi

    Is there anyway to move over the PostHTTPPage/Ex and AddPostVariable into Delphi (or and existing Delphi equivalents) as I'm trying something at the moment and it would make it a lot easier if I could access my website to get some of the info.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  2. #2
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Indy components..
    Verrekte Koekwous

  3. #3
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Thank you - got it all setup now only problem is I can't even get it to return a webpage Maybe someone can point me in the right direction?
    Code:
    program test;
    
    {$APPTYPE CONSOLE}
    
    uses
      SysUtils, IdHTTP;
    
    var
      MyHTTP: TIdCustomHTTP;
    begin
      with MyHTTP do
      begin
        Connect;
        try
          WriteLn(Get(''));
          ReadLn;
        finally
          Disconnect;
        end;
      end;
    end.
    I know there's no URL in there - I took it out as it points to one of my sites files.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  4. #4
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by mixster05 View Post
    Thank you - got it all setup now only problem is I can't even get it to return a webpage Maybe someone can point me in the right direction?
    Code:
    program test;
    
    {$APPTYPE CONSOLE}
    
    uses
      SysUtils, IdHTTP;
    
    var
      MyHTTP: TIdCustomHTTP;
    begin
      with MyHTTP do
      begin
        Connect;
        try
          WriteLn(Get(''));
          ReadLn;
        finally
          Disconnect;
        end;
      end;
    end.
    I know there's no URL in there - I took it out as it points to one of my sites files.
    You might want to initialize the object, like you always need to do .

    MyHTTP := TIdCustomHTTP.Create;

    Or something like that?
    Verrekte Koekwous

  5. #5
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    I was using Create before but it was causing me problems (had even less running than with that) but I'll try again quickly and post up the results.
    Edit: I've gotten a little closer now (Was just using MyHTTP.Create and not assigning it to TIdCustomHTTP.Create ><) only now I'm getting an exception as it wants a host =/ who knew it could be so hard just to get it to return a webpage.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  6. #6
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    Use TIdHTTP?
    I made a new script, check it out!.

  7. #7
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by mixster05 View Post
    I was using Create before but it was causing me problems (had even less running than with that) but I'll try again quickly and post up the results.
    Edit: I've gotten a little closer now (Was just using MyHTTP.Create and not assigning it to TIdCustomHTTP.Create ><) only now I'm getting an exception as it wants a host =/ who knew it could be so hard just to get it to return a webpage.
    It's not hard, once you know how to work with Delphi objects everything is quite easy
    Verrekte Koekwous

  8. #8
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Markus View Post
    Use TIdHTTP?
    I'll try that, though I wanted to use custom as it had a few extra features.

    And I know it gets a lot easier when you get used to working with objects, but I stemmed from PHP, then a bit of C and lastly some Scar, so object-orientated isn't hard to get my head around, but is hard to get used to (doesn't help when I'm still playing with PHP and scar a lot).

    Edit: No need for Connect or Disconnect >< That's what was giving me problems. I only did that the first time as I was following the example in the pdf help.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Which Delphi Ide is the best?
    By ShowerThoughts in forum Delphi/FPC Help and Tutorials
    Replies: 6
    Last Post: 06-01-2008, 12:01 AM
  2. Delphi 7 & Delphi 7 SE Downloads
    By Freddy1990 in forum Delphi/FPC Help and Tutorials
    Replies: 5
    Last Post: 05-21-2007, 04:08 PM
  3. Delphi For PHP
    By TOB in forum News and General
    Replies: 1
    Last Post: 03-12-2007, 02:15 AM
  4. Delphi?
    By ub3r |<1||3r*1337* in forum News and General
    Replies: 7
    Last Post: 06-03-2006, 12:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •