We help IT Professionals succeed at work.

?? Load external .txt file into set location.

538 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.
Comment
Watch Question

Commented:
What scripting languages do you have at your disposal?  ASP, PHP, etc?  

Author

Commented:
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.

Commented:
Have you thought about an auto refresh iframe ?

Commented:
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

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

This what you're looking for?
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
fantastic, thank you so much "dgooding"

Commented:
you're welcome so much "pnorris99"
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.