Jump to content

Pegasus3245

New Members
  • Posts

    6
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Pegasus3245's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I managed to get arround it using; <?php $section = file_get_contents('tempurl.txt', NULL, NULL, 3, 100); ?>[/b] [b]<?php echo "$section";?>
  2. I dont know why, but its suddenly started working.... Anyone is welcome to use the above if they need it. But I believe it will only work in Internet Explorer, not opera, mozilla etc.
  3. Hi Everyone, I have a text box, with an address which visitors need to copy into another application. I have the text box, this has the text inside. All I need now is a button that says 'copy' and when you click it, wola! However, the real world hasnt worked this way for me . The code I have is; <script type="text/javascript"> function ClipBoard() { if (window.clipboardData) { alert("copied"); window.clipboardData.setData("Text",document.form1.name.value); } } </script> <form name="form1" method="post" action=""> <input name="name" type="text" class="inputtext" onclick="highlight(this)" id="name" value="<?php echo "$contents";?>"> <BUTTON onclick="ClipBoard()">Copy</BUTTON> </form> I dont understand why this wont work... Any help would be greatly apreciated. Thanks.
  4. Hi Ignace, Thats great, its working as a link now, however I have the issue that the hyperlink has my web server address in front followed by a , even though the text file doesnt have this inside. Text File: www.gameserver.com <p align="center" class="style1">Server Location:</p><p align="center" class="style3"><a href="<?= file_get_contents('externalurl.txt') ?>">click here</a></p><br> This produces click here to have a link to: www.myserver.com/http://www.gameserver.com cant figure this one out. Kind Regards, Scott.
  5. Hi Berridgeab, Thanks for your reply. All the text file has inside is http://www.gameserverlocation.com just the 1 line. The output is just that, which i have working, but i want it to be a clickable link, rather than just a link you have to copy and paste.
  6. 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.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.