View Full Version : activation/ participation
kaptain
Aug 20th 2004, 10:04 am
my site is all htm pages, does that mean i can not join the ad network
digitalpoint
Aug 20th 2004, 10:14 am
You may be able to, depending on how your server is setup. If the server supports PHP, you may be able to override the extensions so .htm is evaluated as PHP.
kaptain
Aug 20th 2004, 10:23 am
yes my server does support the latest php. i have my own server and have some sites that use php now.
i already registared but it states account not yet active.
i already modified my htaccess and uploaded the other two files and it did write two adds in to the ad_network_ads.txt .
i was trying to figure out what to add to my pages to get the account to validate and to show ads but could not get it to work.
any help would be apreciated
dave
digitalpoint
Aug 20th 2004, 10:27 am
Are ads showing on the site you are trying to validate already? I would assume they would have to if the ad_network_ads.txt has ads in it (unless you called the PHP file directly).
kaptain
Aug 20th 2004, 10:43 am
oh, i did call the php directly once. oops.
i guess my question is.
exctly what code do i need to have on my pages to get the ads to show?
the code i tried i have removed because is was not working. or did not seem to work.
dave
digitalpoint
Aug 20th 2004, 11:01 am
Have you tried the code that the setup instructions has?
http://www.digitalpoint.com/tools/ad-network/setup.php?type=99
Step 3 and higher...
kaptain
Aug 20th 2004, 11:17 am
you know, i was using the wrong code.
this is what i am using now on my site pages:
<?php
ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
include_once ('ad_network.php');
echo $ad_network;
?>
if i chose text link, it would only show a text link correct?
if the above is true i see the ads on my page but it does not validate yet.
after reading post in forum am i to understand that it will not validate until i add the code to all pages with-in the entire site?
dave
digitalpoint
Aug 20th 2004, 11:24 am
Correct... if you select text link only, that's all that would show.
You are also correct in the fact that it should be site-wide in order validate properly. Do you have any central header/footer or anything that is global for your site? Would be easier to add it to one place of course if you do.
kaptain
Aug 20th 2004, 11:28 am
"Do you have any central header/footer or anything that is global for your site?"
i have not figured out how to do that yet. (i am embarrassed to say)
digitalpoint
Aug 20th 2004, 11:30 am
Well might not be a bad idea to look into... :) Not even just for the ad network.
kaptain
Aug 20th 2004, 1:45 pm
i have everything done except i have some pages working out of the cgi-bin
in the coge i tried the original code and tried:
<?php
ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
include_once ('www.mysite.com/ad_network.php');
echo $ad_network;
?>
but can't get the ad to show on cgi pages
the cgi pages are also mode-rewrite to html
also added the http:// before the www.
dave
compar
Aug 20th 2004, 2:20 pm
"Do you have any central header/footer or anything that is global for your site?"
i have not figured out how to do that yet. (i am embarrassed to say)
Start a thread on Server Side Includes. I'm sure you will get lots of help with this rather simple technology.
digitalpoint
Aug 20th 2004, 2:30 pm
but can't get the ad to show on cgi pages
the cgi pages are also mode-rewrite to html
also added the http:// before the www.
dave
Do you have a sample page where you cannot get them to work?
kaptain
Aug 20th 2004, 2:40 pm
http://www.web-site-hosting-n-tools.com/cgi-bin/resources-mode-books-input_string-ASP-locale-us.html
digitalpoint
Aug 20th 2004, 2:45 pm
What type of file is it underneath it all? Basically what would the URL look like without the rewrite?
kaptain
Aug 20th 2004, 2:47 pm
http://www.web-site-hosting-n-tools.com/cgi-bin/resources-mode-books-input_string-ASP-locale-us.cgi
digitalpoint
Aug 20th 2004, 2:48 pm
So you actually have what I assume is a ton of .cgi files in that directory?
Do you know how it's done exactly? With SSI or something else?
kaptain
Aug 20th 2004, 2:52 pm
the cgi script pulls products from an XML feed and produces the page from a template to a page with .cgi then the mode-rewrite changes the .cgi to .html
the pages are dynamic. yes it appears as if i have a few hundred thousand pages in that dir
is that the info your looking for?
digitalpoint
Aug 20th 2004, 2:54 pm
Sort of... kind of hard to help debug it though without seeing the actual CGI code, since an include will be different depending on how the CGI is setup.
kaptain
Aug 20th 2004, 2:58 pm
i'll work on it and let you know how it goes
i do have everything on all my other pages for now
kaptain
Aug 21st 2004, 10:51 am
ok, i have something just not sure how to modify
on the pages from the cgi script
if i wanted to ad a simple footer or a text file ect.
i would need to
<!--apf &apf_include=../html/TEXTFILE.htm!!-->
and that works to include a text file
so i tried
<!--apf &apf_include=../html/ad_network.php!!-->
and that produced
', $ads); if (count ($ads) < 101 || $ads[0] + 3600 < time()) { $ads[] = file_get_contents ('http://ads.digitalpoint.com/network.php?type=link'); $ads[0] = time(); if (count ($ads) > 101) unset ($ads[1]); $file = fopen($ad_file, 'w'); fwrite ($file, implode ('', $ads)); fclose ($file); $ad_network = end ($ads); } else { $ad_network = $ads[rand(1,count($ads))]; } $ad_network .= ''; } else { $ad_network = 'You must set the "ad_network_ads.txt" file to be writable.'; } if (substr ($_SERVER['DOCUMENT_NAME'], -6) == '.shtml') { ini_set ('zlib.output_compression', 0); echo $ad_network; } ?>
look at the bottom of this page: http://www.web-site-hosting-n-tools.com/cgi-bin/resources-mode-software-input_string-Virus+Firewall-locale-us.html
in the location the ad should be
again i have all my other pages working with the ads just fine just not the cgi produced pages.
digitalpoint
Aug 21st 2004, 11:29 am
The problem with that include is that it's a raw file include, rather than spinning it through the PHP parser. So it will just spit out the raw PHP code (as you see).
If the include in your CGI supports URLs, you could do something like this:
<!--apf &apf_include=http://www.web-site-hosting-n-tools.com/ad_network.php!!-->
And add this to the end of the PHP file (before the closing PHP tags):
echo $ad_network;
If that works, you will also need to take out the following from your "normal" files: echo $ad_network;
kaptain
Aug 21st 2004, 4:52 pm
:eek: :mad:
well, no it wont work that way either
i will keep tying, thier has to be a way??
i do have it on a good bit of pages on this site and have other sites that i will be useing this on.
If you or anyone else has another idea...please,please let me know!
thanks for the help so far i have learned a few things. so it was not a waste :)
dave
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.