Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Varios (https://www.clubdelphi.com/foros/forumdisplay.php?f=11)
-   -   delphi a PHP (https://www.clubdelphi.com/foros/showthread.php?t=38953)

rubenlalo 05-01-2007 16:29:15

delphi a PHP
 
Buenas Buenas a todos del Club Delphi.

En alguna ocación encontre este codigo en el foro, este algoritmo recupera el archivo almacenado en forma de cadena de texto (Hexadecimal), lo que quisiera es que me ayuden a convertir el algoritmo a codigo PHP. :eek:
Código Delphi [-]
procedure TfrmCompanies.proStrToBin (img: String; Str: String);
var
  Stream: TFileStream;
  i: integer;
  b: integer;
begin
  Stream:= TFileStream.Create (img, fmCreate);
  try
    i:= 1;
    while i < Length (Str) do begin
      if TryStrToInt ('$' + Copy (Str, i, 2), b) then begin
        Stream.Write (b, 1);
      end else
        Exit;
      Inc (i, 2);
    end;
  finally
    Stream.Free;
  end;
end;

Gracias de antemano por su ayuda espero me puedan ayudar pronto
Bye bye....


La franja horaria es GMT +2. Ahora son las 14:35:06.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi