Jump to content

Php Includes


kaz

Recommended Posts

My page (http://ads.khaleel.co.uk/ad.php)

 

On each load it displays HTML ad code. For example one page load displays:

 

<!-- Powered by LedAds v2.0 - http://www.ledscripts.com --><a target="_blank" href="/cgi-bin/ledads/la_click.cgi?key=2"><img border="0" height="60" src="/cgi-bin/ledads/la_image.cgi?key=2" width="468" alt="#1 Olsen fansite on the web!" /></a><!-- End LedAds v2.0 Ad Code -->

 

The php code is

 

><?
//
Header("content-type: application/x-javascript");
virtual('/cgi-bin/ledads/la_ad.cgi');
?>

 

My External html page where I want the add to show up has this code:

 

><table width="$borderwidth" cellpadding="0" border="0" width="$tablewidth" align="center" bgcolor="$bordercolor">
<tr>
<td class="nav"  style="padding-bottom: 1px" bgcolor="$altbg1">
<center><a href="http://www.khaleel.co.uk/advertise.html?refer=olsen34905039850093sfd">
<img src="http://ads.khaleel.co.uk/newTop.gif" border="0" alt="advertise here!" width="468" height="10" /></a><br>
<script type="text/javascript" src="http://ads.khaleel.co.uk/ad.php"></script></center></td>
</tr>
</table>

 

However every time I try loading this page, the advert never seems to show, it just shows an image above it (the advertise here image) but no ad below it, not even a php error

 

 

Im lost

Link to comment
Share on other sites

><table width="$borderwidth" cellpadding="0" border="0" width="$tablewidth" align="center" bgcolor="$bordercolor">
<tr>
<td class="nav"  style="padding-bottom: 1px" bgcolor="$altbg1">
<center><a href="http://www.khaleel.co.uk/advertise.html?refer=olsen34905039850093sfd">
<img src="http://ads.khaleel.co.uk/newTop.gif" border="0" alt="advertise here!" width="468" height="10" /></a><br>
<script type="text/javascript" src="http://ads.khaleel.co.uk/ad.php"></script></center></td>
</tr>
</table>

 

The problem is your script tag:

<script type="text/javascript" src="http://ads.khaleel.co.uk/ad.php">

 

It should probably be a php include:

<?php include("http://ads.khaleel.co.uk/ad.php"); ?>

 

But your main page will have to be a .php, or you'll have to add something like AddType application/x-httpd-php .php .html to your .htaccess file to get the webserver to parse PHP in an HTML page.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...