PHP "get_meta_tags" how to read "keywords"

Discussion in 'PHP' started by dramiditis, Jan 13, 2009.

  1. #1
    Hi there:
    I'm working on one project and I have small problem. I'm writing a php script that need to be included in HTML page with <iframe>......</iframe> In the script I have to get the "keywords" from the HTML page.
    So, when I'm using "get_meta_tags" I get the "keywords" from the php script, not from HTML page.
    Does anyone have any idea how can I solve this problem?

    Best Regards
     
    dramiditis, Jan 13, 2009 IP
  2. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #2
    Err, why do you have to use an iFrame?

    Couldn't you just make it a PHP and include/require it?

    Dan.
     
    Danltn, Jan 13, 2009 IP
  3. dramiditis

    dramiditis Peon

    Messages:
    87
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I'm working on contextual script, so the publisher get the code in <iframe> and paste that code in his pages and so on ....

    So that php scipt need to read keywords from other pages.
     
    dramiditis, Jan 13, 2009 IP
  4. mallorcahp

    mallorcahp Peon

    Messages:
    141
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    how about passing the url of the page that is requesting the iframe to your script, might need to change you HTML page to a php page (although some servers will execute php in .html extension) ... and then use that as the input ...

    in your HTML page :
    in your script:

     
    mallorcahp, Jan 13, 2009 IP
  5. dramiditis

    dramiditis Peon

    Messages:
    87
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yes if I change HTML extension in .php and if I
    echo ' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] . ' than it works.

    But, the problem is that I don't have any control on html pages, because I'm working on "Adsense" clone script and when my publisher copy/paste iframe code into there pages and I don't know does that pages will be with .html or .php extension.

    :confused:
     
    dramiditis, Jan 13, 2009 IP
  6. mallorcahp

    mallorcahp Peon

    Messages:
    141
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    you could use JavaScript in your HTML page ...

    (note sure if this post should be moved to JavaScript forum ... ???)
     
    mallorcahp, Jan 14, 2009 IP
  7. dramiditis

    dramiditis Peon

    Messages:
    87
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Yes, problem is SOLVED.

    Thanks for all suggestions. I'm not very good with JavaScript and in the future I have to take some free time and to learn JavaScript.
    Regards:cool:
     
    dramiditis, Jan 14, 2009 IP