Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 518
  • Last Modified:

?? Load external .txt file into set location.

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
pnorris99
Asked:
pnorris99
  • 4
  • 2
  • 2
1 Solution
 
dgoodingCommented:
What scripting languages do you have at your disposal?  ASP, PHP, etc?  
0
 
pnorris99Author 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.

0
 
effxCommented:
Have you thought about an auto refresh iframe ?
0
Independent Software Vendors: 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!

 
effxCommented:
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
 
dgoodingCommented:
<?php
  $txt = file("filename.txt");
  echo "<a href=".$txt[0].">Click Here</a>"
?>

This what you're looking for?
0
 
dgoodingCommented:
<?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
 
pnorris99Author Commented:
fantastic, thank you so much "dgooding"
0
 
dgoodingCommented:
you're welcome so much "pnorris99"
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 4
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now