Basically, I am trying to get the following code working, and for the life
of me, I can't figure out where I've gone wrong.
<%
If Server.RequestVariables("HTTP_REFERER") =
"http://www.it-mate.co.uk/main_content/right.asp" Then
<!--#include file="banner.asp"-->
Else
Response.Write "This file does not support hotlinking"
End If
%>
I know it is probably something completely simple, and there's probably a
better way of doing this but, I'm half asleep, stressed to holy hell with my
Tiscali HamsterBand service etc.
Basically, all it is meant to do is allow the include tag if the page
calling it is on the server, and show the message if it is on another
server.
--
Regards
Steven Burn
Ur I.T. Mate Group www.it-mate.co.uk
Keeping it FREE!
Disclaimer:
I know I'm probably wrong, I just like taking part ;o) 4 1905
Includes are done outside of the ASP script blocks. IE:
<% If Server.RequestVariables("HTTP_REFERER") =
"http://www.it-mate.co.uk/main_content/right.asp" Then %>
<!--#include file="banner.asp"-->
<%
Else
Response.Write "This file does not support hotlinking"
End If
%>
Although I believe you already know this, the include will be included
regardless of that condition, but the code won't be executed, so this'll
still be fine. Also, you can you server.Execute "banner.asp" as an
alternative, depending on what it is that banner.asp is doing.
Ray at home
"Steven Burn" <nobody@PVT_it-mate.co.uk> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... Basically, I am trying to get the following code working, and for the life of me, I can't figure out where I've gone wrong.
<% If Server.RequestVariables("HTTP_REFERER") = "http://www.it-mate.co.uk/main_content/right.asp" Then <!--#include file="banner.asp"--> Else Response.Write "This file does not support hotlinking" End If %>
I know it is probably something completely simple, and there's probably a better way of doing this but, I'm half asleep, stressed to holy hell with
my Tiscali HamsterBand service etc.
Basically, all it is meant to do is allow the include tag if the page calling it is on the server, and show the message if it is on another server.
--
Regards
Steven Burn Ur I.T. Mate Group www.it-mate.co.uk
Keeping it FREE!
Disclaimer: I know I'm probably wrong, I just like taking part ;o)
Cheers Ray.
banner.asp is basically just a page with rotator code (top right gold frame
of my site), nothing particularly special.
I didn't actually want to have to do this sort of thing but, I've got people
using it on their own site, and without asking, which is annoying the heck
out of me.
--
Regards
Steven Burn
Ur I.T. Mate Group www.it-mate.co.uk
Keeping it FREE!
Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Ray at <%=sLocation%> <myfirstname at lane 34 . komm> wrote in message
news:us**************@TK2MSFTNGP11.phx.gbl... Includes are done outside of the ASP script blocks. IE:
<% If Server.RequestVariables("HTTP_REFERER") = "http://www.it-mate.co.uk/main_content/right.asp" Then %> <!--#include file="banner.asp"--> <% Else Response.Write "This file does not support hotlinking" End If %>
Although I believe you already know this, the include will be included regardless of that condition, but the code won't be executed, so this'll still be fine. Also, you can you server.Execute "banner.asp" as an alternative, depending on what it is that banner.asp is doing.
Ray at home "Steven Burn" <nobody@PVT_it-mate.co.uk> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl... Basically, I am trying to get the following code working, and for the
life of me, I can't figure out where I've gone wrong.
<% If Server.RequestVariables("HTTP_REFERER") = "http://www.it-mate.co.uk/main_content/right.asp" Then <!--#include file="banner.asp"--> Else Response.Write "This file does not support hotlinking" End If %>
I know it is probably something completely simple, and there's probably
a better way of doing this but, I'm half asleep, stressed to holy hell
with my Tiscali HamsterBand service etc.
Basically, all it is meant to do is allow the include tag if the page calling it is on the server, and show the message if it is on another server.
--
Regards
Steven Burn Ur I.T. Mate Group www.it-mate.co.uk
Keeping it FREE!
Disclaimer: I know I'm probably wrong, I just like taking part ;o)
Public Function ProcessUrl()
If Server.RequestVariables("HTTP_REFERER") =
"http://www.it-mate.co.uk/main_content/right.asp" Then
strUrlAddress = "http://www.it-mate.co.uk/main_content/banner.asp"
On Error Resume Next
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.open "GET",strUrlAddress, false
objXMLHTTP.send
ProcessUrl = objXMLHTTP.ResponseText
Set objXMLHTTP = Nothing
End If
End Function
--
-dlbjr
Discerning resolutions for the alms
Thanks but, there's no need for all of that code, Ray's correction worked
;o)
--
Regards
Steven Burn
Ur I.T. Mate Group www.it-mate.co.uk
Keeping it FREE!
Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
dlbjr <do******@do.u> wrote in message news:iDbub.197$Qy4.14783@typhoon01... Public Function ProcessUrl() If Server.RequestVariables("HTTP_REFERER") = "http://www.it-mate.co.uk/main_content/right.asp" Then strUrlAddress = "http://www.it-mate.co.uk/main_content/banner.asp" On Error Resume Next Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP") objXMLHTTP.open "GET",strUrlAddress, false objXMLHTTP.send ProcessUrl = objXMLHTTP.ResponseText Set objXMLHTTP = Nothing End If End Function
-- -dlbjr
Discerning resolutions for the alms
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: FLEB |
last post by:
I like PHP for its excellent inline integration into standard HTML files,
but I like Perl for its quick-moving syntax and simpler data-processing. To
resolve this deep-seated inner turmoil (oh, the...
|
by: Jaime Wyant |
last post by:
*long post alert!*
Can anyone give me some pointers on writing "self-updating" python
programs? I have an application that is almost ready for beta
testing. I want to be able to fix any bugs...
|
by: Az Tech |
last post by:
Hi people,
(Sorry for the somewhat long post).
I request some of the people on this group who have good experience
using object-orientation in the field, to please give some good ideas
for...
|
by: John Smity |
last post by:
Does anyone have any links or ideas on how you bunch
together all your administrative pages? Currently I have
10-20 different options that users can configure
(add/change/delete) and it is...
|
by: Mark |
last post by:
I need some ideas for tables in my MDB. right now I have an "text
editor" table, a "Projects" table, and a "contacts" table. Can anyone
give me any ideas?
Thanks!
- Mark
|
by: Dave |
last post by:
I have always taken it for granted that once RI is in place, no orphan
records can be created, and that RI can't be put in place while orphans
exist, but today I came across a situation where that...
|
by: Liddle Feesh |
last post by:
Good afternoon m.p.d.l.vb :)
I'm looking for some sound system design ideas. I'm planning to build an
application in VB.NET that interfaces with MSDE for a local estate agency
(realtor in the...
|
by: Brandon McGinty |
last post by:
Hi,
I've been learning python for the past couple of months and writing misc
scripts here and there, along with some web apps.
I'm wondering if anyone has ideas of programs I might try my hand at...
|
by: mahmoud wessimy |
last post by:
hi
can anyone tell me some ideas cauz i have a project in c++ to do any program i want but i don't know what to do?
|
by: mistersexy |
last post by:
I have been programming in python for some time but I have become
short of ideas. A software exhibition is coming up, and I plan to show
python's worth 'cos it is quite underrated in this part of...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |