Web Hosting Talk







View Full Version : hiding email address in anchor tag on webpage


Ron
06-18-2004, 01:31 PM
I have to use a link similar to the following and want to know how I can hide it as the link contains an email address.

http://www.some-site.com/agentlink.asp?ta_arc=91875&pcode=PNG&agencyemail=me@my-domain.com&sitecolor=669999

What this link does is send me an email confirmation when someone orders insurance online from insurance company's site that I am an agent for.

My concern is that I may be leaving my email address out in the open for abuse.

ACW
06-18-2004, 01:48 PM
My guess is that you have no control of the code in agentlink.asp. If that is the case I would create my own ASP page in one of my sites that would sent those variables from the server instead.


<%
Dim objMSXML
Dim strResponse

Set objMSXML = CreateObject("MSXML2.XMLHTTP")

objMSXML.open "Get", "http://www.some-site.com/agentlink.asp" & _
"?ta_arc=91875&pcode=PNG&agencyemail=me@my-domain.com&sitecolor=669999", False
objMSXML.send ""

strResponse = objMSXML.responseText

' If you want to display the results to the page you can always do this...
Response.Write strResponse

Set objMSXML = Nothing
%>


Hope this helps.

Ron
06-18-2004, 10:50 PM
Thank you for the script ACW. You are correct that I have no control over the code in agentlink.asp. I tried using your script but instead of opening that page on "some-site.com" it tries to open it on my own domain (which your script is hosted on). Of course there is no such site as some-site.com, I just used it as an example to avoid making this public (along with my email address).

I am very interested in your script if you can tell me how to get it to display the page from the other site on which I have no control. Many thanks!

ACW
06-19-2004, 12:01 AM
I'm not sure I understand, but it should work if you use the whole URL - including the http. If you want you can PM the code to see if I can help.

ACW
06-19-2004, 12:06 AM
I just tried this and it returns a google search.

<%
Dim objMSXML
Dim strResponse

Set objMSXML = CreateObject("MSXML2.XMLHTTP")

objMSXML.open "Get", "http://www.google.com/search?hl=en&ie=UTF-8&q=msxml", False
objMSXML.send ""

strResponse = objMSXML.responseText

' If you want to display the results to the page you can always do this...
msgbox strResponse

Set objMSXML = Nothing
%>