Successive queries against a web page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sinan

    Successive queries against a web page

    Hi
    I would like to make successive posts (queries) to a web page. To do
    this I use fsockopen() as many times as the number of posts. But I
    guess that this may be done via only one socket. Is this true? Or any
    other way of doing this shorter? Because it comes to me redundant to
    open as many sockets as queries.
    Thanks
  • Elliot

    #2
    Re: Successive queries against a web page

    Whats wrong with doing them in a loop?

    This would also make them successive... rather than parallel?

    "sinan" <siyisoy@hotmai l.com> wrote in message
    news:34a4dd4e.0 407270450.23f5b 2ba@posting.goo gle.com...[color=blue]
    > Hi
    > I would like to make successive posts (queries) to a web page. To do
    > this I use fsockopen() as many times as the number of posts. But I
    > guess that this may be done via only one socket. Is this true? Or any
    > other way of doing this shorter? Because it comes to me redundant to
    > open as many sockets as queries.
    > Thanks[/color]


    Comment

    • Timothy Madden

      #3
      Re: Successive queries against a web page

      On 27 Jul 2004 05:50:18 -0700, sinan wrote:
      [color=blue]
      > Hi
      > I would like to make successive posts (queries) to a web page. To do
      > this I use fsockopen() as many times as the number of posts. But I
      > guess that this may be done via only one socket. Is this true? Or any
      > other way of doing this shorter? Because it comes to me redundant to
      > open as many sockets as queries.
      > Thanks[/color]

      HTTP/1.1 cames with persistent connections. In fact the server may expect
      the client to retry an interrupted connection (but just for once, not
      several times).

      Mark the length of each of your post requests and pipe them on the same
      connection. You will recevie the replays in the same order. Beware that
      some servers will send you a Connection: close header in the replay.
      --
      Timothy Madden
      Romania
      ------------------------------------
      And I don't wanna miss a thing

      Comment

      Working...