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.

Get page keywords?

Discussion in 'Programming' started by mikelbeck, Sep 22, 2005.

  1. #1
    I'm looking to do something like AdWords or YPN, where it scans the current page for keywords and then provides relevant ads.

    How could I get the text of a page while it's being displayed?
     
    mikelbeck, Sep 22, 2005 IP
  2. DavidAusman

    DavidAusman Peon

    Messages:
    399
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you can easily use PHP to get the text.

    <?php
    $url = 'http://www.blabla.com';
    $file = fopen($url, 'r');
    while(!feof($file))
    {
    $lines = fgets($file, 1024);
    echo $lines;
    }
    fclose($file);
    ?>
     
    DavidAusman, Sep 22, 2005 IP
  3. mikelbeck

    mikelbeck Well-Known Member

    Messages:
    790
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    108
    #3
    Can I do that from a page that I'm trying to read? For example, if I put that code up on the top of the page and try to read that same page, will it read the entire page or only up to where the script is? Or will it loop, as each time it opens the page it'll re-run the same code?
     
    mikelbeck, Sep 22, 2005 IP
  4. adresanet

    adresanet Peon

    Messages:
    131
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    That script read entire page
    You can read ww.xyx.com/page.html and result to diaplay on ww.abc.com
     
    adresanet, Oct 2, 2005 IP