Re: [twsocket] HTTP server...

2012-07-21 Thread zayin
Hello,

Thanks.

It looks like:  AnswerString(Flags,'204 No Content','','','');  works fine.

Ciao,

Mark

 

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] HTTP server...

2012-07-21 Thread RTT

On 21-07-2012 21:22, zayin wrote:

I was wondering if there is a better solution. Some answer code that tells
the browser the data was received but not to change page or to reload the
button host page.

http://www.w3schools.com/ajax/default.asp
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] HTTP server...

2012-07-21 Thread zayin
Hello,

A user will be on a page. He will click a button and I will receive a URL
with some parameters. All good.

Now, I do not have a page to show him. The URL is only for passing in the
parameters. The URL for the page passing the parameters and the current page
are not the same. The URL for passing in the parameters is fixed. The URL
for the button's 'host' page is not fixed.

I want the current page in the browser to stay the same. The one with the
button.

I can answer with a redirection to the current page (the button host page).
Works but not the smoothest operation.

I was wondering if there is a better solution. Some answer code that tells
the browser the data was received but not to change page or to reload the
button host page.

Cheers,

Mark



 

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Ping doesn´t work for 64 bit

2012-07-21 Thread Arno Garrels
David A. G. wrote:
> Hello, I wonder if there is any solution to the Ping component, it is
> not working under Win64. 
> I´m getting the error: “General Failure”, compiled with Delphi XE2
> (icsv8w-140712) under Win 7 64bit. regards,
> David A. G.

This bug should be fixed in current SVN repo or next daily/nightly
download.

-- 
Arno Garrels  
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

[twsocket] Simple Get HTML from URL

2012-07-21 Thread Miguel Enguiça
Hi,

I need to get the HTML content from a URL list. I don't want to spend more than 
10 seconds on each URL either if the remote server is down or a read timeout 
occurs. I've tried with:

function GetUrlContentUTF8ICS(const Url: string):UTF8String;
var
lData: TStringStream;
httpcli1 : THTTPCli;
begin
  Result:= '';
  lData :=  TStringStream.Create();
  httpcli1:= THTTPCli.Create(nil);
  httpcli1.Timeout:= 1;
  //
  httpcli1.RcvdStream := lData;
  httpcli1.URL:= url;
  try
httpcli1.get;
Result:= lData.DataString;
  except
Exit;
  end;
  lData.Free;
  httpcli1.Free;
end;

But the timeout doesn't occur and it gets hanged in slow or offline websites. 
Am I missing something. Is it needed to implement a Timer based solution for 
this?

Thanks,
Miguel
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be