Solved

?? Load external .txt file into set location.

Posted on 2004-03-22
8
510 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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.

840 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