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.

Ad on .html pages

Discussion in 'Co-op Advertising Network' started by g00gl3r, Nov 9, 2004.

  1. #1
    Hey,

    I've registered fo rhte network, i've made the txt file CHMOD'd it 777, i've created the php file and added the main code and am struggling on what to stick in the pages.

    It's mainly pages ending .html on my site (which has some .php files) so i've tried the code
    <?php
    	ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    	include ('ad_network.php');
    	echo $ad_network[0];
    ?>
    Code (markup):
    and that didnt work, so then I tried the code
    <!--#include virtual="/ad_network.php" -->
    Code (markup):
    and that didnt work...

    Now i've also tried the line in the htaccess file with both codes above and neither work (or I cant get the bloody thing to work)...

    Any help?
     
    g00gl3r, Nov 9, 2004 IP
  2. Trance-formation

    Trance-formation Peon

    Messages:
    598
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you need to get your server to parse .html pages as .php... by putting a line in .htaccess

    AddType application/x-httpd-php .php .htm .html
    Code (markup):
    This will cause some loss in performance as every time an html page is looked at, the server will have to see if it needs to run any php, but your php code should work
     
    Trance-formation, Nov 9, 2004 IP
  3. g00gl3r

    g00gl3r Well-Known Member

    Messages:
    167
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    128
    #3
    Already added it, ok lol,

    Just so we know what i have done right from the start to make sure i've done it right before I start to lose the plot.

    - Create ad_netwok.php and include the given code.
    - Create a blank file called ad_network_ads.txt and CHMOD it to 777.
    - Add the code to my .htaccess as my site is html based and not saved as .php or .shtml.
    - Add the code as if my site was php based as I have added the code to my htaccess to accept include line in the .html saved pages (whole site inc forum if it works).
    5, Request validation and test the site.

    I get "Site failed automatic validation as of 2004-11-09 (make sure URL and site type is correct - if everything is correct, make a request in the forum for assistance)." when I auto validate the submission.

    hmm, whats the score here then?


    ________________________________________

    Edited:

    For some reason the adds are working now on the html pages but not the forum www.advancedfloorheating.com/f/index.php to take a look (at the bottom of the page).

    Somebody must have hit this problem, any help?
     
    g00gl3r, Nov 9, 2004 IP
  4. Trance-formation

    Trance-formation Peon

    Messages:
    598
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I can only see the adds on the homepage... have you put the code on every page??
     
    Trance-formation, Nov 10, 2004 IP
  5. g00gl3r

    g00gl3r Well-Known Member

    Messages:
    167
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    128
    #5
    www.advancedfloorheating.com/f/index.php

    lol,

    that's what i am saying, the ads are not showing (doh) the code is where the 'External Sites' text is at the bottom of EVERY page (as it's in the footer). But it appears that it doesn't want to show.

    Have I got to create a new ad_network.php and stick it in the folder /f ?
     
    g00gl3r, Nov 10, 2004 IP
  6. Trance-formation

    Trance-formation Peon

    Messages:
    598
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I didn't have to for my site, but I do recall Shawn saying that someone may have to... I would try it... I used an include in my subdirectories that gave the path to the original include file in the main directory.
     
    Trance-formation, Nov 10, 2004 IP
  7. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #7
    You can use the full path to the ad_network.php file in your include statement if your server is having trouble finding it without the path.
     
    digitalpoint, Nov 10, 2004 IP
  8. g00gl3r

    g00gl3r Well-Known Member

    Messages:
    167
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    128
    #8
    so I change

    <?php
    ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    include ('ad_network.php');
    echo $ad_network[2];
    ?>

    to

    <?php
    ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    include ('http://www.advancedfloorheating.com/ad_network.php');
    echo $ad_network[0];
    ?>

    Is that right, because I am sure I have already tired that... :(

    This isn't gonna happen is it? lol, I wanted to add this to load sof my sites too but this is costing far too much in time at this rate lol, oh well..

    ________________________________

    Edited:-

    I have tried that just (check the site) and it isn't having any of it.., who really knows my problem and isn't just guessing? Who's the person who made this system, can they help me? ::sniff sniff::

    ________________________________

    Edited again....:-

    I have also just tired

    <?php
    ini_set ("include_path", ini_get ("include_path") . 'http://www.advancedfloorheating.com/');
    include ('ad_network.php');
    echo $ad_network[0];
    ?>
    and
    <?php
    ini_set ("include_path", ini_get ("include_path") . ':http://www.advancedfloorheating.com/');
    include ('ad_network.php');
    echo $ad_network[0];
    ?>

    As I don't know PHP this is really annoying me lol, I have uploaded it to my shopping cart system which is a'ok, the site which is also a'ok (and goes really deep too) and the bloody forum which is only 1 teir deep is giving me shit? grrrrr
     
    g00gl3r, Nov 10, 2004 IP
  9. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #9
    No, not the URL, you would need to know the file path on the server itself.
     
    digitalpoint, Nov 10, 2004 IP
  10. g00gl3r

    g00gl3r Well-Known Member

    Messages:
    167
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    128
    #10
    ahhhhh, ok, so the full root path, does this need to be in the same place I tried with my first attempt then? where the domain is..! (currently)

    _______________________________________

    FFS..!

    I have just tried

    <?php
    ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    include ('/home/virtual/advancedfloorheating.com/var/www/html/ad_network.php');
    echo $ad_network[0];
    ?>

    and that isn't workin either.... one last attempt now and then that's it, I can't have it...!
     
    g00gl3r, Nov 10, 2004 IP
  11. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #11
    The code is there... but it's being spit out as literal text, so for whatever reason it's not running it through the PHP parser. Unfortunately I don't know anything about the guts of Invision, so I'm pretty useless for this.
     
    digitalpoint, Nov 10, 2004 IP
  12. g00gl3r

    g00gl3r Well-Known Member

    Messages:
    167
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    128
    #12
    hmmm, what shall I do? I really wanted this, and I was gonna stick it on a few sites (the ones at linked to, at the bottom of www.untoldmedia.com) which would have helped my weight for my AFH site (if i used the referal bonus link) and coop to get used more...

    I am apsolutely gutted..! look at the times of the posts I have posted, I have been up for hours and hours on this and I mean like 25/30 lmao (not just the coop, but a few small things similar)

    If anybody can help me then let me know..

    _____________________________________

    Edited:

    ok, I thought to myself I would just rename the ad_networks.php to something else rather than updating all my site with pages not containing the code, just while I see if I can get it running, so the ads no show (as I get no benefit until it's validated) soooo I did and I got this..


    Warning: main(ad_network.php): failed to open stream: No such file or directory in /home/virtual/site39/fst/var/www/html/index.html on line 553

    Warning: main(ad_network.php): failed to open stream: No such file or directory in /home/virtual/site39/fst/var/www/html/index.html on line 553

    Warning: main(): Failed opening 'ad_network.php' for inclusion (include_path='.:/php/includes:/usr/share/php:../:../../:../../../:../../../../') in /home/virtual/site39/fst/var/www/html/index.html on line 553


    Now, the forum must be finding the file else it would give this error too, right?

    For the records I have named the file back again in the hope I can resolve this problem tonight. If the person who made this or installed it can help that would be good..!
     
    g00gl3r, Nov 10, 2004 IP