473,382 Members | 1,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

ASP to re-load page from time to time to reset varaibles

I have a website that I subscribe to that allows me to track tasks. I
have an extra computer with a big monitor that i want to always
display the task list. the problem is after so many hours I get
logged out.

I need to need to reload that sign in url every few hours

If I load this url it logs me and resets my session variable and
redirects me
http://www.taskmaster.com/tc************************@mydomain.com&password=m ypassword&login.x=17&login.y=7"
What i ended up doing was making a webpage on my webserver that
automaticly redirects to the page

I have a webpage http://www.mydomain.com/reload.asp that has the code
below.

But if there a way I can change that code on my page so that it just
loads the page in the background and doesnt redirect? that way I can
then modify my page to automaticly refresh every few hours to reset
the cookie/session variable.

<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.taskmaster.com/tc?
action=Login&login=rich@mydomaincom&password=passw ord&login.x=17&login.y=7"
%>

Jan 6 '08 #1
11 2883
client side problem

use a refresh meta tag

http://www.i18nguy.com/markup/metatags.html
Jan 6 '08 #2
that code seems to just work as a redirect, but it just redirects you
once. that is what I was playing with before I came here

what i need is a page on my domain which goes out and loads another on
someone elses domain page every hour. But it needs to stay on the
page in my domain so that one hour later it can reload the other guys
page ...

I thought I had a solution by using frames. I stuck the third party
website in a frame but that seems cause the third party site to fail.
it gives an error that i have already logged in on another window. so
frames doesnt seem to work.. that is my core problem. If I could get
it to work in a frame then I could put a reload on the parent frame.

I built a page taskmaster_con.asp which has teh redirect code it in..
works lke a champ when I call it directly however when I stick it in a
frame the website I acm
What I tried to do was stick taskmaster_con.asp into a frame (whatway
I could refresh the master frame which would then load this login page
in a child window)
However when I run it from a frame the login fails with a message
about me loggingin through another browser window.
which has
<html>
<meta http-equiv="Refresh" content="0; url=http://www.taskmaster.com/
tc?
ac*********************@mydomaain.com&password=pas sword&login.x=17&login.y=7">
</html>
On Jan 6, 12:12*pm, "Jon Paal [MSMD]" <Jon nospam Paal @ everywhere
dot comwrote:
client side problem

use a refresh meta tag

http://www.i18nguy.com/markup/metatags.html
Jan 6 '08 #3
the tag has a content value which sets the refresh cycle in seconds.

when your page is refreshed it will refresh the page from the outside domain.

Jan 6 '08 #4
pt
That code does a redirect... so even if I set my page to reload every
30 seconds, the first time it reloads it does the redirect and then
that is it..

I thought maybe I could stick this page into a frame and add a timer
to that. I built a fram page with a single frame however when I run
that page the 3rd party website gives me an error
'Your session is invalid. It has either timed out or you have logged
into your account from another browser window.'

It somehow knows I am loading this page from a frame.. I know this
because if i load taskmaster_con.asp directly I get logged in by the
third party website.

If there any change I can make to the frames that would keep the third
party website from being able to tell I am loading this into a frame?
I think that is my core problem now.

<html>
<frameset >
<frame src="taskmastter_con.asp">

</frameset>
</html>


On Jan 6, 3:54*pm, "Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot
comwrote:
the tag has a content value which sets the refresh cycle in seconds.

when your page is refreshed it will refresh the page from the outside domain.
Jan 7 '08 #5
if the third party page is doing a frame detection you won't be able to defeat that.

Jan 7 '08 #6
pt
On Jan 7, 12:20*pm, "Jon Paal [MSMD]" <Jon nospam Paal @ everywhere
dot comwrote:
if the third party page is doing a frame detection you won't be able to defeat that.
What about another command that I could run that would 'load' the
other page. I dont need to even see the other page. I am looking now
to see if there is a way to just load the other page into memory the
set cookies and/or session variables.
Jan 7 '08 #7


"What about another command that I could run that would 'load' the
other page. I dont need to even see the other page. I am looking now
to see if there is a way to just load the other page into memory the
set cookies and/or session variables."

I'm not really sure I understand what you are trying to accomplish here. If you're tryting to get content from another site you may
want to look into something called screen - scraping . Check it out on google.


Jan 7 '08 #8
pt
On Jan 7, 3:46*pm, "Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot
comwrote:
"What about another command that I could run that would 'load' the
other page. *I dont need to even see the other page. * I am looking now
to see if there is a way to just load the other page into memory the
set cookies and/or session variables."

I'm not really sure I understand what you are trying to accomplish here. *If you're tryting to get content from another site you may
want to look into something called screen - scraping . *Check it out on google.
I am not looking to get content from the page.. The URL I submit logs
me in and resets my cookie.. every 5 hours I want to re-login. I dont
need to submit a form since the login info is in the url. I just want
to load a page so that it resets my cookie.

I want to load the same 3rd party webpage every 5 hours. When I do a
response redirect I get directed there once, end of story.. When I
stick the 3rd party inside a fram and reload the parent frame the 3rd
party site doesnt like that.

Jan 7 '08 #9

I don't know what this means:

"the 3rd party site doesn't like that"

This is an ASP newsgroup. We can help you solve an ASP question. We can't help you with things that third party pages like or don't
like


Jan 8 '08 #10

"pt" <ri*************@gmail.comwrote in message
news:7d**********************************@i72g2000 hsd.googlegroups.com...
On Jan 7, 3:46 pm, "Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot
comwrote:
>>
"What about another command that I could run that would 'load' the
other page. I dont need to even see the other page. I am looking now
to see if there is a way to just load the other page into memory the
set cookies and/or session variables."

I'm not really sure I understand what you are trying to accomplish here.
If you're tryting to get content from another site you may
want to look into something called screen - scraping . Check it out on
google.

I am not looking to get content from the page.. The URL I submit logs
me in and resets my cookie.. every 5 hours I want to re-login. I dont
need to submit a form since the login info is in the url. I just want
to load a page so that it resets my cookie.

I want to load the same 3rd party webpage every 5 hours. When I do a
response redirect I get directed there once, end of story.. When I
stick the 3rd party inside a fram and reload the parent frame the 3rd
party site doesnt like that.
<<

Sounds to me that you don't actually need the content of the page you just
want send the request for the page to keep a login alive.

You need chunk of clientside javascript:-
var xhr = GetXMLHttpRequest()
if (xhr)
{
xhr.Open("GET", sURL, false)
xhr.Send(null)
}
function GetXMLHttpRequest()
{

if (window.XMLHttpRequest) {
return new XMLHttpRequest()
} else if (window.ActiveXObject) {
return new ActiveXObject("MSXML2.XMLHTTP.3.0")
}

}

Where sURL is the login url you want to hit.

--
Anthony Jones - MVP ASP/ASP.NET
Jan 8 '08 #11
this worked like a champ..... thanks anthony...

On Jan 8, 3:13*am, "Anthony Jones" <A...@yadayadayada.comwrote:
"pt" <richard.zell...@gmail.comwrote in message

news:7d**********************************@i72g2000 hsd.googlegroups.com...
On Jan 7, 3:46 pm, "Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dotcom>wrote:
"What about another command that I could run that would 'load' the
other page. I dont need to even see the other page. I am looking now
to see if there is a way to just load the other page into memory the
set cookies and/or session variables."
I'm not really sure I understand what you are trying to accomplish here.

If you're tryting to get content from another site you maywant to look into something called screen - scraping . Check it out on

google.

I am not looking to get content from the page.. The URL I submit logs
me in and resets my cookie.. every 5 hours I want to re-login. *I dont
need to submit a form since the login info is in the url. *I just want
to load a page so that it resets my cookie.

I want to load the same 3rd party webpage every 5 hours. *When I do a
response redirect I get directed there once, end of story.. *When I
stick the 3rd party inside a fram and reload the parent frame the 3rd
party site doesnt like that.
<<

Sounds to me that you don't actually need the content of the page you just
want send the request for the page to keep a login alive.

You need chunk of clientside javascript:-

var xhr = GetXMLHttpRequest()
if (xhr)
{
* * xhr.Open("GET", sURL, false)
* * xhr.Send(null)

}

function GetXMLHttpRequest()
{

if (window.XMLHttpRequest) *{
* * return new XMLHttpRequest()} else if (window.ActiveXObject) {

* * return new ActiveXObject("MSXML2.XMLHTTP.3.0")

}
}

Where sURL is the login url you want to hit.

--
Anthony Jones - MVP ASP/ASP.NET
Jan 8 '08 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Nel | last post by:
I have a question related to the "security" issues posed by Globals ON. It is good programming technique IMO to initialise variables, even if it's just $foo = 0; $bar = ""; Surely it would...
4
by: Craig Bailey | last post by:
Anyone recommend a good script editor for Mac OS X? Just finished a 4-day PHP class in front of a Windows machine, and liked the editor we used. Don't recall the name, but it gave line numbers as...
4
by: Alan Walkington | last post by:
Folks: How can I get an /exec'ed/ process to run in the background on an XP box? I have a monitor-like process which I am starting as 'exec("something.exe");' and, of course the exec function...
1
by: John Ryan | last post by:
What PHP code would I use to check if submitted sites to my directory actually exist?? I want to use something that can return the server code to me, ie HTTP 300 OK, or whatever. Can I do this with...
8
by: Beowulf | last post by:
Hi Guru's, I have a query regarding using PHP to maintain a user profiles list. I want to be able to have a form where users can fill in their profile info (Name, hobbies etc) and attach an...
1
by: joost | last post by:
Hello, I'm kind of new to mySQL but more used to Sybase/PHP What is illegal about this query or can i not use combined query's in mySQL? DELETE FROM manufacturers WHERE manufacturers_id ...
2
by: sky2070 | last post by:
i have two file with jobapp.html calling jobapp_action.php <HTML> <!-- jobapp.html --> <BODY> <H1>Phop's Bicycles Job Application</H1> <P>Are you looking for an exciting career in the world of...
1
by: Brian | last post by:
I have an array like this: $events = array( array( '2003-07-01', 'Event Title 1', '1' //ID Number (not unique) ), array( '2003-07-02',
1
by: Clarice Almeida Hughes | last post by:
tenho um index onde tenho o link pro arq css, como sao visualizados pelo include todas as paginas aderem ao css linkado no index. so q eu preciso de alguns links com outras cores no css, o q devo...
2
by: Frans Schmidt | last post by:
I want to make a new database with several tables, so I did the following: <?php CREATE DATABASE bedrijf; CREATE TABLE werknemers (voornaam varchar(15), achternaam varchar(20), leeftijd...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.