Solved

?? Load external .txt file into set location.

Posted on 2004-03-22
8
511 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
ID: 10650223
What scripting languages do you have at your disposal?  ASP, PHP, etc?  
0
 
LVL 1

Author Comment

by:pnorris99
ID: 10650323
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
ID: 10650936
Have you thought about an auto refresh iframe ?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Expert Comment

by:effx
ID: 10650956
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
 
LVL 2

Expert Comment

by:dgooding
ID: 10650999
<?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
ID: 10651012
<?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
ID: 10651203
fantastic, thank you so much "dgooding"
0
 
LVL 2

Expert Comment

by:dgooding
ID: 10651223
you're welcome so much "pnorris99"
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

685 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