Search the Community
Showing results for tags 'fileread'.
-
Hi All, Having a dilema here... I run a games server, its a crap web based game - ill not go into detail. Anyhow, the server URL changes when the server is restarted, this is automatically saved into a text file. I then have a batch file which automatically copies this file onto my web server every 10 minutes. I then have a php page which reads this text file and a couple others. The webpage looks a little like; Server Status online Server Address www.webgame.com etc.etc.... The problem is, the link doesnt display as a clickable link, this is what I am wanting. Its just displayed as plain text, you have to then copy and paste this link into your browser, I would really like the link to just be clickabe. The code I am currently using is; <p align="center" class="style1">Server Location:</p> <p align="center" class="style3"> <?php $filename = "externalurl.txt"; $filehandle = fopen($filename, "r"); $contents = fread($filehandle, filesize($filename)); fclose($filehandle); echo $contents; ?> </p> <br> I basically want the link to display as is, I did try putting the whole thing inside <a href"<CODE>"> this unsurprisingly didnt work. I have seen loads of other help websites etc, these all only show methods of displaying links that have the actual code in the text file, my text file has no code in there, just the actual link - and this cannot be changed. Any help would be greatly apreciated.