Ver Mensaje Individual
  #6  
Antiguo 23-01-2006
Avatar de acertij022
acertij022 acertij022 is offline
Miembro
 
Registrado: may 2003
Ubicación: Argentina-Bs. As.
Posts: 233
Reputación: 24
acertij022 Va por buen camino
Thumbs up

Gracias a todos con la info que me dieron me funciono, era como me habian dicho ustedes:
Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var
hSession, hURL: HInternet;
lpBuffer: array[0..1024+1] of Char; 
dwBytesRead: DWORD;
begin
hSession := InternetOpen(PChar(ExtractFileName(Application.ExeName)),INTERNET_OPEN_TYPE_PRECONFIG,nil, nil, 0);
if Assigned( hSession ) then 
  begin
  hURL := InternetOpenUrl( hSession, PChar('http://www.xxxxxxxx.com.ar/ip.php'), nil, 0, 0, INTERNET_FLAG_ASYNC);
  if Assigned( hURL ) then
     while true do
          begin
          dwBytesRead := 1024;
          InternetReadFile( hURL, @lpBuffer, 1024, dwBytesRead );
          if dwBytesRead = 0 then break;
          lpBuffer[dwBytesRead] := #0;
          Memo1.Lines.Add( lpBuffer );
          end; //while
InternetCloseHandle( hURL );
end;
InternetCloseHandle( hSession );
end;
Responder Con Cita