Adding co-op to html page

Discussion in 'Co-op Advertising Network' started by mortgage-pro-seo, Feb 23, 2005.

  1. #1
    I am trying to add the links to my site via include. Do I have to use the .htaccess if my site is php enabled?
     
    mortgage-pro-seo, Feb 23, 2005 IP
  2. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Search the forum for information on how to tell the server to send pages with a .html extention through the php parser using a .htaccess file.
    NOTE: You probably should have posted this in setup/validation help.
     
    exam, Feb 23, 2005 IP
    digitalpoint likes this.
  3. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #3
    What type of include? More info (the more the better)... :)
     
    digitalpoint, Feb 23, 2005 IP
  4. mortgage-pro-seo

    mortgage-pro-seo Peon

    Messages:
    170
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Here is the code I placed at the bottom of my page:

    <?php
    	ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    	include ('ad_network.php');
    	echo $ad_network[0]; - echo $ad_network[1]; - echo $ad_network[2]; - echo $ad_network[3]; - echo $ad_network[4]; ?>
    Code (markup):
    I receive this Parse error: parse error, unexpected T_ECHO in on line 55 once the .htaccess is installed? Any suggestoins?
     
    mortgage-pro-seo, Feb 24, 2005 IP
  5. Patient

    Patient Raider

    Messages:
    336
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    123
    #5
    Do you have an xml statement in your page.

    I noticed that if you set your site to parse php in html and you have <? in your pages it will try and parse all the content as php including stuff like:

    <?xml version="1.0" encoding='UTF-8'?>
     
    Patient, Feb 24, 2005 IP
  6. Josh

    Josh Peon

    Messages:
    893
    Likes Received:
    82
    Best Answers:
    0
    Trophy Points:
    0
    #6
    change it too:

    <?php
    	ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    	include ('ad_network.php');
    	echo $ad_network[0];
            echo "-";
            echo $ad_network[1];
     echo "-";
            echo $ad_network[2];
     echo "-";
            echo $ad_network[3];
     echo "-";
            echo $ad_network[4]; 
    ?>
    Code (markup):

    Josh
     
    Josh, Feb 24, 2005 IP
  7. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #7
    Or better yet, drop all your echo statements and instead use:

    echo implode (' - ', $ad_network);
    PHP:
     
    digitalpoint, Feb 24, 2005 IP
  8. mortgage-pro-seo

    mortgage-pro-seo Peon

    Messages:
    170
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Thanks for the replies. Shawn your code seems the easiest however I could not get it to work.

    It seems I am only displaying a couple of the same ads over and over. Could you please try and help me debug this code.

    An example of the what the code I  have is doing check out http://www.mortgagesaver.org/dirs/testing.htm
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>
    <body>
    <?php
    	ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    	include ('ad_network.php');
    	echo $ad_network[0];
            echo "-";
            echo $ad_network[1];
     echo "-";
            echo $ad_network[2];
     echo "-";
            echo $ad_network[3];
     echo "-";
            echo $ad_network[4]; 
    ?>
    </body>
    </html>
    Code (markup):
     
    mortgage-pro-seo, Feb 25, 2005 IP
  9. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #9
    What's the URL of your site?
     
    digitalpoint, Feb 25, 2005 IP
  10. mortgage-pro-seo

    mortgage-pro-seo Peon

    Messages:
    170
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
  11. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #11
    It looks random to me.
     
    digitalpoint, Feb 25, 2005 IP
  12. mortgage-pro-seo

    mortgage-pro-seo Peon

    Messages:
    170
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #12
    For some reason I often get 3 of the same ads http://www.mortgagesaver.org/dirs/testing just add .htm


    On this site I have ads running on the forums. I just added the coop to my linking directory (which is static html pages). Do I have to create a new account since these links or running on plain html pages?
     
    mortgage-pro-seo, Feb 26, 2005 IP
  13. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #13
    Probably just need to give it time for more ads to be cached on your end.
     
    digitalpoint, Feb 26, 2005 IP
  14. Josh

    Josh Peon

    Messages:
    893
    Likes Received:
    82
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Yeah, they are certainly rotating for me :)


    Josh
     
    Josh, Feb 26, 2005 IP