Code needed in PHP

Discussion in 'PHP' started by ezakvel, Jan 24, 2006.

  1. #1
    Hello freinds can any one help me with this

    i have a html page where i need to add google adsense code

    like this

    <td>
    adsense code
    </td>

    is it possible to write a php code (or any code) so that adsense code will be read from a file and should be placed inside the <td></td>..

    is it possible to do ? i can't change the html page to php page
    i need this so that i need not change the html page everytime

    your help is appreciated
     
    ezakvel, Jan 24, 2006 IP
  2. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #2
    T0PS3O, Jan 24, 2006 IP
  3. ezakvel

    ezakvel Peon

    Messages:
    63
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thx for your reply.But my server is configured to for shtml page.I have to save the html file as shtml page to work with ssi.
    Is is it possible to change ?
    Becaus i have many incoming links so i can't change the file name
     
    ezakvel, Jan 24, 2006 IP
  4. Salsa

    Salsa Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Check out this current thread on the same (sort of) subject:

    http://forums.digitalpoint.com/showthread.php?t=52562

    Sorry I can't post live links till I have 10 posts, but I think you'll find your questions/solutions already answered there.

    I hope this helps,
    Salsa
    _____
     
    Salsa, Jan 24, 2006 IP
  5. ezakvel

    ezakvel Peon

    Messages:
    63
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    so it means there is no way to solve this problem.i don't require only php any script?
     
    ezakvel, Jan 24, 2006 IP
  6. Salsa

    Salsa Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Either your server needs to be configured to parse .html or .htm files (or whatever your file exthensions are) as PHP, or you have to change your file names to .php extensions (or whatever your server is already configured to parse as PHP). It didn't look like either of those are ideal or possible with your current hosting, so that's why TOPS30 suggested Server Side Includes.

    My thought is that if you can't work out something to solve the problem with your host, it may be time to move. Doing what you want to do is so important that you need to solve it one way or the other.

    Sorry I'm not more help,
    Salsa
    _______
     
    Salsa, Jan 24, 2006 IP
  7. ezakvel

    ezakvel Peon

    Messages:
    63
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    thx Salsa i did your first option .SSI is working for html page now after adding tag in .htaccess file.Is there any disadvantages by allowing html page to include ssi .(any performance ,seo problem?)
     
    ezakvel, Jan 24, 2006 IP
  8. Salsa

    Salsa Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Glad you got it working. I'm no SSI expert, but I'm sure that any performance degradation is negligable at most. The efficiency they'll add to your life, however, will be enormous. As for spiders and other visitors, I think that no one will know that you're using them but you--and they wouldn't care if they did.
     
    Salsa, Jan 24, 2006 IP