logo
Hosting, Domain, Mail,web hizmetleri
TR
mail gönder
Bireysel, kurumsal ve profesyonel web Hosting . TÜRKİYE
destek@abista.net
+ 90 212 617 22 91
iletisim Domain
8.99$
  HOSTING DOMAIN MAIL BAYİ HOST SERVER HOST TEKNİK DESTEK
ustgribar
Üye Girişi
Hesap Adı :
Şifresi :
  Şifremi Unuttum
  ASP Tear Kullanımı  
 

ASP Tear'ın kendi örneğini incelemek için :
formpost.asp.txt - testretrieve.asp.txt - tear.xls


Basics

So how does it work? Currently, the component is really very simple as it supports only one method (server-side VBScript pseudocode given here):

Const Request_POST = 1  Const Request_GET = 2  Set xObj = Server.CreateObject("SOFTWING.AspTear")  strRetVal = xObj.Retrieve(strUrl, nRequestType, strQueryString|strPostData, _                   strUsername, strPassword)  
The file retrieved is returned as method return value (strRetVal; errors are returned with exceptions - see the samples). If you don't need to supply Username and Password, leave them empty (""). Thus, the simplest request looks like this:
strRetVal = xObj.Retrieve("http://www.alphasierrapapa.com/iisdev/",2,"","","")  
Notice that I did not supply a document - the component supports redirects! Now let's get a little bit more sophisticated: POST a form to the server with form data. How is this form data formatted? It needs to have the following form,
variable1=value1&variable2=value2...  
where value1 to n need to be URL-encoded. To URL-encode a string value, use Server.URLEncode (this is also mandatory for querystrings):
strPostData = "Name=" & Server.URLEncode("Christoph Wille") & _                "&goto=" & Server.URLEncode("http://www.alphasierrapapa.com/")  
The call to Retrieve now looks like this:
strRetVal = xObj.Retrieve("http://www.alphasierrapapa.com/",1,strPostData,"","")  
The last thing to discuss is how to access SSL-secured items - it is as simple as replacing http:// with https:// in the strUrl parameter!

ASP Sample

In this section, there is a simple sample with two files: formpost.asp (Listing 1) which accepts a parameter and dumps it with the ALL_HTTP server variable; the second file is testretrieve.asp (see Listing 2), which uses the component to retrieve the formpost.asp file and return it to the client.

Listing 1: formpost.asp

<PRE>  <%  Response.Write Request.ServerVariables("ALL_HTTP")  %>  </PRE>  <%  Response.Write Request.Form("test")  %>    <form method=post action="">  <input type=text name="test">  <input type=submit>  </form>  

Listing 2: testretrieve.asp

<%  Const Request_POST = 1  Const Request_GET = 2    Set xobj = CreateObject("SOFTWING.ASPtear")  Response.ContentType = "text/html"        On Error Resume Next  ' URL, action, payload, username, password  strRetval = xobj.Retrieve("http://194.8.136.102/iisdev/asptear/formpost.asp", _                   Request_POST, "test=wille", "", "")    If Err.Number <> 0 Then      Response.Write "<b>"      If Err.Number >= 400 Then          Response.Write "Server returned error: " & Err.Number      Else          Response.Write "Component/WinInet error: " & Err.Description      End If      Response.Write "</b>"      Response.End  End If    Response.Write strRetval  %>  

Use It Everywhere!

Due to its design, the component can be used in any Automation client as it does not rely on the ASP intrinsic objects. The following code snippet shows the Excel module sample shipping with the component (change the URLs as needed):

Const Request_POST = 1  Const Request_GET = 2    Sub DoTestComponent()  On Error GoTo err_test_handler      Dim xobj As Object, strRetval As String      Set xobj = CreateObject("SOFTWING.ASPtear")            ' URL, action, payload, username, password      strRetval = xobj.Retrieve("http://194.8.136.100/formpost.asp", _  	     Request_POST, "test=wille", "", "")      Debug.Print strRetval            Exit Sub  err_test_handler:      If Err.Number >= 400 Then          MsgBox "Server returned error: " & Err.Number      Else          MsgBox "Component/WinInet error: " & Err.Description      End If  End Sub  

Installation and Download

 
   
.Hakkmzda
Abista Firma Tantm
.Hizmetlerimiz
Hosting
Domain
E-Mail
Bayi / Web Master Paketleri
Dedicated Server
Arama Motor Kaydı
Server Kiralama
Desteklediimiz Componentler
Web Tasarım
Basında Biz
Müşterilerimize Özel Bölümler
a Phpmyadmin [mysql ynt]
xmesaj Mail hesaplar yönetim paneli
ticket Bayi yönetim paneli
user Mütşeri yönetim paneli
 
Ziyaretçilerimize Özel
picto Gerekli Programlar DOWNLOAD
  Ftp program, hazr scriptler, asp componentleri, database'ler vs..
picto Temel Bilgiler
 

Outlook Express ayarlar, MS. Outlook ayarlar, Exchange Ayarlar, Php Myadmin , Frontpage extention, ASP Tear ayar ve rneklerivs..


Quaranty
Geri Ödeme Garantisi

15 Gün içinde memnun kalınmaması durumunda
% 100 Para iade garantisi

   
 
bize ulaşın - ödeme seçenekleri - abone işlemleri - müşteri hizmetleri - destek - abista kurumsal

Adres : Asmalı Mescit mh. Meşrutiyet cad. No: 37 Sakarya is Merkezi Taksim / İSTANBUL.
Teknik şube : B.H. Paşa Mah. 1018 Sk. No: 22 - 500 Evler G.O.Paşa İstanbul - Tel : (212) 617 22 91
info@abista.net