Getting the ads to display

Discussion in 'Co-op Advertising Network' started by Jester, Jul 19, 2005.

  1. #1
    Hello all,

    I run a PHP Picture hosting site.

    I created the ad_network_322.php, chmod to 755 in the root of my site.
    I created the ad_network_322.txt, chmod to 666 in the root of my site.

    I placed the ad code in my footer, and in one of my banner slots. It won't display any ads, and because of such, no validation. The ad code is viewable in the source.

    The setup is simple, I can't see where it screwed up.

    Anyone have any hints?

    Thanks a bunch

    J
     
    Jester, Jul 19, 2005 IP
  2. frankm

    frankm Active Member

    Messages:
    915
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    83
    #2
    please post the URL of the site so we can see the exact error message.

    but what I always change in the script is this:

    
    $ad_file = '/apache/website/html/ad_network_ads_123.txt';
    
    PHP:
    instead of the part where it looks for the .txt
    
    	$ad_file = 'ad_network_ads_123.txt';
    	for ($i = 0; $i <= 11; $i++) {
    		$p = substr ('../../../../../../../../../../', 0, $i * 3);
    		if (file_exists ($p . $ad_file)) {
    			$ad_file = $p . $ad_file;
    			break;
    		}
    	}
    
    PHP:
     
    frankm, Jul 19, 2005 IP
  3. Jester

    Jester Well-Known Member

    Messages:
    202
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    148
    #3

    There is no error. But I will make the change and get right back to ya.

    J
     
    Jester, Jul 19, 2005 IP
  4. Jester

    Jester Well-Known Member

    Messages:
    202
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    148
    #4
    Still no display, my banner is integrated in the site, here is the code when i view the source:

    
    <div id="bottombanner"><?php
    	ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
    	include ('ad_network_322.php');
    	echo $ad_network;
    ?></div>
    PHP:
    I don't think the server is parsing the php, except that the ENTIRE site is php...lol I'm baffled...but love a challenge.

    J

    PS There are no errors in the httpd error log either... :(

    PSs

    After adding the banner code to a test php page, I was able to get these errors, can anyone decode this?

    [client xxxxxx] PHP Notice: Undefined offset: 3 in /path/to/www/picturepuppy/ad_network_ads_322.php on line 43
    [client xxxxxx] PHP Notice: Undefined offset: 4 in /path/to/www/picturepuppy/ad_network_ads_322.php on line 43
    [client xxxxxx] PHP Warning: fsockopen(): unable to connect to ads.digitalpoint.com:80 in /path/to/www/picturepuppy/ad_network_ads_322.php on line 7
    [client xxxxxx] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /path/to/www/picturepuppy/ad_network_ads_322.php on line 8
    [client xxxxxx] PHP Warning: feof(): supplied argument is not a valid stream resource in /path/to/www/picturepuppy/ad_network_ads_322.php on line 9
    [client xxxxxx] PHP Warning: fread(): supplied argument is not a valid stream resource in /path/to/www/picturepuppy/ad_network_ads_322.php on line 10
    [client xxxxxx] PHP Notice: Undefined variable: string in /path/to/www/picturepuppy/ad_network_ads_322.php on line 10
     
    Jester, Jul 19, 2005 IP
  5. dave487

    dave487 Peon

    Messages:
    701
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I am having trouble cos my server has a firewall and I needed to ask my host to allow me to connect to ads.digitalpoint.com and validate.digitalpoint.com
     
    dave487, Jul 21, 2005 IP