Web Analytics Made Easy -
StatCounter How to "hotlink" txt files in a table from another domain - CodingForum

Announcement

Collapse
No announcement yet.

How to "hotlink" txt files in a table from another domain

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to "hotlink" txt files in a table from another domain

    Dear Sirs/Madams

    I am a dumb **** when it comes to coding, i know how to hotlink a image, but how do you do it when you wanna have some txt links from a different domain.

    i`m thinking of having some of my sites in a txt link for every pages i have on the internet like in a 1 row table and when i add a new site it will come up on hundreds of pages


    like this

    site1.com - Site2.com - site3.com


    help me, i will give food for coding

  • #2
    If I understand your question , you could use an external javascript to do this. You external script would look something like this:

    document.write('<a href="http://site1.com">site 1</a>');
    document.write('<a href="http://site2.com">site 2</a>');
    document.write('<a href="http://site3.com">site 3</a>');

    You could just follow the pattern adding more links as needed. You would save the file and store it somewhere. Lets say you called it myLinks.js and stored it in the root of site1. Then on any page you would like to print out the links you would simply put:

    <script type="text/javascript" src="http://site1.com/myLinks.js"></script>

    Now anytime a page is loaded with these script tags the links in the myLinks.js file will be written out to the page. You would only ever have to change the myLinks.js file to change what is written on each of the pages containg these script tags.

    Comment


    • #3
      Thanx a million John that worked fine, i own you some food

      but how do you do it and still get the txt links spidered by the SE
      or will the SE robots track the links the way it is now

      Comment


      • #4
        I could be wrong but I beleive it will still work. It is my understanding that the bot will see the link to the js file then go there and read its links.

        Comment

        Working...
        X