Solved

automating tasks?

Posted on 2003-12-06
13
264 Views
Last Modified: 2010-04-06
hi there, is there a way which I can make an HTML file on a site works on its own?
0
Comment
Question by:msaa
13 Comments
 
LVL 15

Expert Comment

by:Timbo87
ID: 9891137
What do you mean by "works on its own"? You can use a scripting language like PHP or ASP to streamline updating tasks. I run a PHP news script for the latest new regarding my site and it makes updating a lot more convenient. I also made some BAT files that I just double-click and they automatically upload the whole site. If you need help with either, don't hesitate to ask.
0
 

Author Comment

by:msaa
ID: 9891142
I mean I have an html file containing Javascript which downloads or does anything from another websites.. I want to make this file work on its own.. without me needing to open it in my browser.. i want it to work from the server..
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9891869
You don't want an HTML page for this.  You need an application or script on the server.  You'd need to provide details about the server you're using and what you need the application/script to do.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:msaa
ID: 9891877
ok, its a unix based server.. and I need it to refresh an image for example from a site..
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9891893
I'm a bit confused by two of your statements that seem to contradict each other.

>> I want to make this file work on its own.. without me needing to open it in my browser

and

>> I need it to refresh an image for example from a site

Do you mean:

a) You want a page, that is being displayed in a browser, to be automatically refreshed

or

b) The server should occasionally update an image that it is storing (eg. by fetching a new image from another site)?

The server may be Unix, but what is the web/application server (Apache? Tomcat? etc.)?
0
 

Author Comment

by:msaa
ID: 9891901
no need for viewing.. but need to request the image only... yes
 b is correct

b) The server should occasionally update an image that it is storing (eg. by fetching a new image from another site)?

the server is Apache.. :)
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9891922
Hmm.  In that case, you probably want to create a PHP script or something to do this for you.  Unfortunately (in this case), I'm a Java specialist, so I'm not sure I can help you much more.  Hopefully though, this has helped to clarify your requirements so Timbo87 might be able to make some good suggestions ;-)

0
 

Author Comment

by:msaa
ID: 9892037
if I open a webpage, which for example has a javascript and has content that refreshes periodically... I want the same thing to happen from my server and continously without needing me to open the site and the HTM page.. I guess this is only possible on Windows servers maybe?
0
 
LVL 15

Accepted Solution

by:
jimmack earned 50 total points
ID: 9892203
The platform (Windows or Unix) shouldn't make any difference.  In the case of JavaScript, the client is doing the refreshing.  Your requirement is that you do something similar on the server.

As I said, I mainly deal with Java, so if I was doing this, I'd probably have a servlet (or separate Java thread) running continuously to do the occasional refreshes.  Because Apache isn't a servlet container, you can't do this with a servlet.  That's why you need more input from Timbo87 or another expert that can explain how to do what you want with PHP or Perl or some other language that is (or is easily) integrated with Apache.

I'm sure that what you want to do is probably quite easy to someone who uses those languages ;-)
0
 
LVL 18

Expert Comment

by:SquareHead
ID: 9906103
This is totally not my bag, but it sounds like you need to execute a script, job, or batch via a cron job -- sort of like Windows' Scheduled Tasks...

I've done this on Windows servers: scheduled a VBS script to run that performs the same steps as a web page. I'm sure the Unix world has similar functionality using cron, cgi, perl, and/or PHP...
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logiā€¦
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question