andreshm
asked on
POSTING to URL through ASP
HI.
Is there any possible way (without dll's or extra software) to "simulate" or replace a form (a regular one, method=POST) by an ASP script ?
I just want to get into that page, grab some variables and post tehm to an external URL immediately, and I just want to make It "invisible" for curious people.
I dont want to pass them using the URl?variable=123,
I've been trying to search the way to do it, but haven;t found anything.
PLz Help
thanks
Is there any possible way (without dll's or extra software) to "simulate" or replace a form (a regular one, method=POST) by an ASP script ?
I just want to get into that page, grab some variables and post tehm to an external URL immediately, and I just want to make It "invisible" for curious people.
I dont want to pass them using the URl?variable=123,
I've been trying to search the way to do it, but haven;t found anything.
PLz Help
thanks
ASKER
I mean
to Change this (i.e.)
<form method="POST" action="URLHERE" name="whatever">
<input name="ZIp" type="hidden" value="<%=VAR%>">
<input name="website" type="hidden" value="<%=website %>">
</form>
by an ASP script that submits that form automatically. No user intervention . I know how to do that using javascript, but don;t want to use it and besides If someone checks the source from the page I don;t want them to know what is on the form and where is going to.
thanks
to Change this (i.e.)
<form method="POST" action="URLHERE" name="whatever">
<input name="ZIp" type="hidden" value="<%=VAR%>">
<input name="website" type="hidden" value="<%=website %>">
</form>
by an ASP script that submits that form automatically. No user intervention . I know how to do that using javascript, but don;t want to use it and besides If someone checks the source from the page I don;t want them to know what is on the form and where is going to.
thanks
Exactly, that's what the tricky pixel does.
P.S. Except you'd use the "GET" method, with Request.QueryString() on your page.
The fake image sends that stuff to your page through the querystring without the user seeing it. Of course, you're limited to whatever information you can put in the querystring, same as you would be with a hidden form.
The fake image sends that stuff to your page through the querystring without the user seeing it. Of course, you're limited to whatever information you can put in the querystring, same as you would be with a hidden form.
ASKER
Well, I tried your method, and it seems it's not working for my purposes. The problem is that using this wont't trigeer the action on the other page... I have to post the variables to a CGI script in another server, who evaultes the variables and take an action, ( it gest me to the URL "b" or URL "B" after that.
thanks
thanks
What exactly are you trying to do? I don't mean your method of posting the form, I mean what are you really trying to do? :)
ASKER
ok. here I go again
as far as I know there are two methods to send the information using a form: GET and POST.
A form using GET can be Easily simulated on asp with and "autosend" using Response.Redirect("teform. asp?var1=x xxx&var2=a sdasd"). It takes me to theform.asp and makes whatever it needs to do.
OK?
NOw What happens if I need to POST these variables, and send them automatically? I just need to because Is the only method accepted by the remote server script, besides is a little more secure.
Thanks.
as far as I know there are two methods to send the information using a form: GET and POST.
A form using GET can be Easily simulated on asp with and "autosend" using Response.Redirect("teform.
OK?
NOw What happens if I need to POST these variables, and send them automatically? I just need to because Is the only method accepted by the remote server script, besides is a little more secure.
Thanks.
You can simulate a FORM POST using Microsoft.ServerXMLHTTP.
Basically, you connect to another server, and send a POST message using XMLHTTP. Here are a number of references to get you started. After you look at these, if you have any follow-up questions feel free to post them here.
Best Regards,
apollois
~~~~~~~~~~~~~~~~~~~~~
Here is an example:
~~~~~~~~~~~~~~~~~~~~~
This uses the GET method, but the POST is very similar.
========================== ========== ========== ========== ======
<%@ Language="VBScript" %>
<%
Dim objSvrHTTP
Dim PostData
Set objSvrHTTP = Server.CreateObject("Msxml 2.ServerXM LHTTP.4.0" )
objSvrHTTP.open "GET", "http://search.atomz.com/search/?sp-a=sp10009b2d&sp-q=binary", false
objSvrHTTP.send
Response.Write objSvrHTTP.responseText
%>
========================== ========== ========== ========== =========
~~~~~~~~~~~~~~~~~~~~~~~~~
For details, please see:
~~~~~~~~~~~~~~~~~~~~~~~~~
Frequently Asked Questions about ServerXMLHTTP
http://support.microsoft.com/default.aspx?scid=kb;EN-US;290761
ServerXMLHTTP 4.0 Object Documentation
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/htm/xml_obj_iserverxmlhttprequest_5115.asp
MSXML 4.0 SDK Documentation
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/htm/sdk_intro_6g53.asp?frame=true
ServerXMLHTTP 4.0 Example and Docs - PerfectXML.com
http://www.perfectxml.com/msxmlHTTP.asp
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~
Here's where to get the latest version
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~
MSXML 4.0 SP 1 (Microsoft XML Core Services)
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=0CDD34BF-50EA-4238-846B-243C58FF224A
Microsoft XML Core Services 4.0 SP1
http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/001/766/msdncompositedoc.xml
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
TROUBLESHOOTING
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
Proxy Configuration Utility Must Be Run for ServerXMLHTTP to Work
http://support.microsoft.com/default.aspx?scid=kb;EN-US;289481
Download Proxycfg.Exe From Following MSDN Web Site At:
http://msdn.microsoft.com/code/sample.asp?url=/msdn-files/027/001/468/msdncompositedoc.xml
Basically, you connect to another server, and send a POST message using XMLHTTP. Here are a number of references to get you started. After you look at these, if you have any follow-up questions feel free to post them here.
Best Regards,
apollois
~~~~~~~~~~~~~~~~~~~~~
Here is an example:
~~~~~~~~~~~~~~~~~~~~~
This uses the GET method, but the POST is very similar.
==========================
<%@ Language="VBScript" %>
<%
Dim objSvrHTTP
Dim PostData
Set objSvrHTTP = Server.CreateObject("Msxml
objSvrHTTP.open "GET", "http://search.atomz.com/search/?sp-a=sp10009b2d&sp-q=binary", false
objSvrHTTP.send
Response.Write objSvrHTTP.responseText
%>
==========================
~~~~~~~~~~~~~~~~~~~~~~~~~
For details, please see:
~~~~~~~~~~~~~~~~~~~~~~~~~
Frequently Asked Questions about ServerXMLHTTP
http://support.microsoft.com/default.aspx?scid=kb;EN-US;290761
ServerXMLHTTP 4.0 Object Documentation
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/htm/xml_obj_iserverxmlhttprequest_5115.asp
MSXML 4.0 SDK Documentation
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/htm/sdk_intro_6g53.asp?frame=true
ServerXMLHTTP 4.0 Example and Docs - PerfectXML.com
http://www.perfectxml.com/msxmlHTTP.asp
~~~~~~~~~~~~~~~~~~~~~~~~~~
Here's where to get the latest version
~~~~~~~~~~~~~~~~~~~~~~~~~~
MSXML 4.0 SP 1 (Microsoft XML Core Services)
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=0CDD34BF-50EA-4238-846B-243C58FF224A
Microsoft XML Core Services 4.0 SP1
http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/001/766/msdncompositedoc.xml
~~~~~~~~~~~~~~~~~~~~~~~~~~
TROUBLESHOOTING
~~~~~~~~~~~~~~~~~~~~~~~~~~
Proxy Configuration Utility Must Be Run for ServerXMLHTTP to Work
http://support.microsoft.com/default.aspx?scid=kb;EN-US;289481
Download Proxycfg.Exe From Following MSDN Web Site At:
http://msdn.microsoft.com/code/sample.asp?url=/msdn-files/027/001/468/msdncompositedoc.xml
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
THANKS!
You're welcome!
So, does this answer your question?
Best Regards,
apollois
So, does this answer your question?
Best Regards,
apollois
ASKER
exactly what I was looking for. thanks
apollois,
I try to dowenload Proxycfg.exe but can't find that page.
http://support.microsoft.com/default.aspx?scid=kb;EN-US;289481
Answer one of those question please, and get all points :
http://oldlook.experts-exchange.com/questions/20914870/Call-Another-Page.html
http://oldlook.experts-exchange.com/questions/20913529/Payment-gateway.html
Thanks.
I try to dowenload Proxycfg.exe but can't find that page.
http://support.microsoft.com/default.aspx?scid=kb;EN-US;289481
Answer one of those question please, and get all points :
http://oldlook.experts-exchange.com/questions/20914870/Call-Another-Page.html
http://oldlook.experts-exchange.com/questions/20913529/Payment-gateway.html
Thanks.
<img src="somepage.asp?variable
?
That's what is called a "tricky pixel"...