Viendo el post de Doddy deci traducir esta funcion http://indetectables.net/viewtopic.php?f=100&t=53754
les dejo la funcion y un ejemplo
uses
  SysUtils,idhttp;

function getShortUrl(const url: string): string;
var
http:TIdHTTP;
begin
  http:=TIdHTTP.Create(nil); //creamos el objeto
  try
   Result:=http.Get('http://tinyurl.com/api-create.php?url='+url); //retornamos la url
  finally
   http.Free;//liberamos el objeto
  end;
end;


//ejemplo de uso
var //declaramos variables
url:string;
urlCorta:string;
begin
  url:='https://www.google.com.mx'; //url original
  urlCorta:=getShortUrl(url); //obtenemos la url corta
  writeln('La url es: ',urlCorta);//la mostramos por pantalla
  Readln;
end.
Skype:crack8111
Responder

Volver a “Fuentes”