<% Response.charset = "ISO-8859-1" %>
abs;
There have been 18 items by gUiTaR_mAn (Search limited from 29/04/2023)
Posted by gUiTaR_mAn on 29/04/2008, 18:52 in ASP
<% Response.charset = "ISO-8859-1" %>
Posted by gUiTaR_mAn on 30/04/2008, 11:16 in ASP
Posted by gUiTaR_mAn on 09/05/2008, 09:15 in ASP
Posted by gUiTaR_mAn on 09/02/2008, 15:48 in ASP
Posted by gUiTaR_mAn on 01/05/2008, 10:29 in ASP
<% Dim Arquivo Arquivo = "musica.mp3" Response.Buffer = True Response.AddHeader "Content-Type","application/x-msdownload" Response.AddHeader "Content-Disposition","attachment; filename=" & Arquivo Response.Flush Set objStream = Server.CreateObject("ADODB.Stream") objStream.Open objStream.Type = 1 objStream.LoadFromFile Server.MapPath(Arquivo) Response.BinaryWrite objStream.Read objStream.Close Set objStream = Nothing Response.Flush %>
Posted by gUiTaR_mAn on 29/04/2008, 18:56 in ASP
Posted by gUiTaR_mAn on 30/04/2008, 11:26 in ASP
Function Idade(data) Idade = Year(Now()) - Year(data) iData = Day(data) &"/"& Month(data) &"/"& Year(Date()) If DateDiff("d", Date(), iData) > 0 Then Idade = Idade -1 End Function
Posted by gUiTaR_mAn on 29/04/2008, 12:30 in Artigos, Dicas e Tutoriais de ASP
<% 'Tratamento de imagens externas 'por Alexandro Cunhago 'em 29-04-2008 'email: alex@megaclassi.com.br 'msn: guitarman@pop.com.br On Error Resume Next 'aqui vamos receber o endereço da imagem imagem original imagem = request.QueryString("img") 'esta função serve para converter o códigos-binário em string, porém nao vamos utuliza-lo nessa aplicação... Function BinaryToString(strBinary) Dim intCount BinaryToString ="" For intCount = 1 to LenB(strBinary) BinaryToString = BinaryToString & chr(AscB(MidB(strBinary,intCount,1))) Next End Function 'aqui comessa a grande sacada... é onde acessamos a url resgatada acima e pegamos seu código binário, com XMLHTTP Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP") xml.Open "GET", ""& imagem &"", False xml.setRequestHeader "User-Agent","Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" xml.setRequestHeader "referer", "http://www.seusite.com.br" xml.Send var = xml.responsebody 'response.BinaryWrite var set xml = nothing 'código binário na mão... agora é so utilizar o método OpenBinary, do aspjpeg para carregar a imagem com este componente... agora vc pinta e borda a imagem como quiser 'neste exemplo eu vou apenas redimensionar imagens com largura maiores do que 400 pixels Set Jpeg = Server.CreateObject("Persits.Jpeg") Jpeg.OpenBinary var L = 400 If Jpeg.OriginalWidth > Jpeg.OriginalHeight Then If Jpeg.OriginalWidth > L Then Jpeg.Width = L Jpeg.Height = Jpeg.OriginalHeight * L / Jpeg.OriginalWidth End if Else If Jpeg.OriginalHeight > L Then Jpeg.Height = L Jpeg.Width = Jpeg.OriginalWidth * L / Jpeg.OriginalHeight End if End If 'e agora com o SendBinary eu estou imprimindo a imagem na tela, sem precisar se quer salva-la no meu servidor, nao ocupando espaço em disco. Jpeg.SendBinary %>
<img src="criaImg.asp?img=url_da_imagem">
Posted by gUiTaR_mAn on 09/05/2008, 09:18 in ASP
If seu_recordset.EOF Then response.write("Não há registros") else 'mostra os seus registros End if
Posted by gUiTaR_mAn on 17/01/2008, 17:54 in ASP
Posted by gUiTaR_mAn on 15/01/2009, 18:51 in ASP
Posted by gUiTaR_mAn on 29/04/2008, 18:50 in ASP
Posted by gUiTaR_mAn on 04/03/2008, 19:49 in Avaliação de Sistemas
Posted by gUiTaR_mAn on 05/03/2008, 11:20 in Avaliação de Sistemas
Posted by gUiTaR_mAn on 05/02/2008, 08:52 in Delphi e Delphi.NET
procedure TForm1.Button4Click(Sender: TObject); var ftp: TChilkatFtp2; success: Integer; localFilename: String; remoteFilename: String; begin ftp := TChilkatFtp2.Create(Self); // Any string unlocks the component for the 1st 30-days. success := ftp.UnlockComponent('Anything for 30-day trial'); if (success <> 1) then begin ShowMessage(ftp.LastErrorText); end; ftp.Hostname := 'ftp.cinefotomary.com.br'; ftp.Username := '******'; ftp.Password := '*****'; // The default data transfer mode is "Active" as opposed to "Passive". // Connect and login to the FTP server. success := ftp.Connect(); if (success <> 1) then begin ShowMessage(ftp.LastErrorText); abort; end; // Change to the remote directory where the file will be uploaded. success := ftp.ChangeRemoteDir('www'); if (success <> 1) then begin ShowMessage(ftp.LastErrorText); abort; end; // Upload a file. localFilename := 'c:\teste.jpeg'; remoteFilename := 'teste.jpeg'; success := ftp.PutFile(localFilename,remoteFilename); if (success <> 1) then begin ShowMessage(ftp.LastErrorText); abort; end; ftp.Disconnect(); ShowMessage('File Uploaded!'); end;
Posted by gUiTaR_mAn on 05/02/2008, 13:24 in Delphi e Delphi.NET
Posted by gUiTaR_mAn on 07/02/2008, 12:10 in ASP
Posted by gUiTaR_mAn on 04/03/2008, 18:06 in ASP
Community Forum Software by IP.Board
Licensed to: Webmasters Online