Solved

?? Load external .txt file into set location.

Posted on 2004-03-22
8
504 Views
Last Modified: 2008-03-03
Hi there,

Probably really simple.
What I want to do is have my webpage read a line of text from a text file and enter it into the relevant position.

IE - http://text-from-file-goes-here/test/index.html

Any help appreciated.

Thanks guys.
0
Comment
Question by:pnorris99
  • 4
  • 2
  • 2
8 Comments
 
LVL 2

Expert Comment

by:dgooding
Comment Utility
What scripting languages do you have at your disposal?  ASP, PHP, etc?  
0
 
LVL 1

Author Comment

by:pnorris99
Comment Utility
I can use either.
All it needs to do is load an external text fle (which is updated every few minutes) into a webpage so that when a user looks at the page it appears as a complete link that they can click on.

I have a little experience with PHP, but not much with ASP.

0
 
LVL 10

Expert Comment

by:effx
Comment Utility
Have you thought about an auto refresh iframe ?
0
 
LVL 10

Expert Comment

by:effx
Comment Utility
Dis regard my last, i got a bit confused, if you want code to do that i will post it for you the language will be ASP
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 2

Expert Comment

by:dgooding
Comment Utility
<?php
  $txt = file("filename.txt");
  echo "<a href=".$txt[0].">Click Here</a>"
?>

This what you're looking for?
0
 
LVL 2

Accepted Solution

by:
dgooding earned 250 total points
Comment Utility
<?php
  $txt = file("filename.txt");
  echo "<a href=http://".$txt[0]."/test/index.html>Click Here</a>"
?>

Sorry.  This is the format you wanted it in.
0
 
LVL 1

Author Comment

by:pnorris99
Comment Utility
fantastic, thank you so much "dgooding"
0
 
LVL 2

Expert Comment

by:dgooding
Comment Utility
you're welcome so much "pnorris99"
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

If like me you are one who spends a lot of time working and scripting with cmd.exe, sometimes it is handy to be able to quickly view a calendar for a given month and year. This script will quickly do just that!  Save the code posted below to a .bat …
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now