1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Dynamic JavaScript... Is it bad for SEO?

Discussion in 'Search Engine Optimization' started by Al Capone, Feb 20, 2006.

  1. #1
    Good afternoon :)

    I have an arcade site and I want to use Dynamic JavaScript to make people who want to add my game to there site be forced to leave the link back to my site, would search engines be able to see this, and would it be a good idea (in an seo point of view)

    example:

    instead of
    they put
    on there blog or w/e which will go to
    a file which has that code

    whats everyones view on this, is it seo friendly? will the script passover spiders and pr to me?

    Thanks in advance for everyones input
    SEMrush
     
    Al Capone, Feb 20, 2006 IP
    elixir likes this.
    SEMrush
  2. mad4

    mad4 Peon

    Messages:
    6,989
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This would not be SEO friendly.

    The best thing is to use php to open their webpage every few days and detect if there is a link to your site on the page. Kind of like a spider.

    Their site still displays the <script src="http://url.com/media.php?someurl=loadthis&id=234"></script> part but this script only outputs the game and not the link to your website.

    If their site fails the validation at any time then you can simply disable the script until they fix it.
     
    mad4, Feb 21, 2006 IP
  3. Al Capone

    Al Capone Well-Known Member

    Messages:
    784
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    140
    #3
    Thanks, is there a link or tutorial on how to do this?
     
    Al Capone, Feb 21, 2006 IP
  4. mad4

    mad4 Peon

    Messages:
    6,989
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #4
    ini_set (default_socket_timeout, "3");
    ini_set (user_agent, "Al Capone Validator");
    error_reporting(0);
    
    $theurl="http://www.theirwebsite.com";
    
    $filestring=file_get_contents("$theurl");
    
    
    $findme  = 'http://www.yoursite.com';
    $pos = strpos($filestring, $findme);
    
    // Note the use of ===.  Simply == would not work as expected
    // because the position of 'a' was the 0th (first) character.
    if ($pos === false) {
       echo "The string '$findme' was not found in the url '$theurl'";
    $valid="no";
    } else {
       echo "The string '$findme' was found in the url '$theurl'";
       echo " and exists at position $pos";
    $valid="yes";
    
    }
    $todaysdate= date("d-M-Y");
    
    $result = MYSQL_QUERY("UPDATE yourtablename SET valid='$valid',validated='$todaysdate' WHERE url='$theurl");
    	
    
    PHP:
     
    mad4, Feb 21, 2006 IP
  5. Al Capone

    Al Capone Well-Known Member

    Messages:
    784
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    140
    #5
    thanks, but i wouldnt be able to add each site that is leaching, it would be to many and to much work, il just have to deal with it... thanks again
     
    Al Capone, Feb 21, 2006 IP
  6. mad4

    mad4 Peon

    Messages:
    6,989
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You would just need to set up a database containing the urls of each website that is using your script.

    Then every week of so you run a script that loops through all the entries in the database and put the urls through my script and updates the database with the results.

    Its a simple thing to do and is worth doing even for 10 extra links.
     
    mad4, Feb 22, 2006 IP