DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Pay-Per-Click Advertising (http://www.daniweb.com/forums/forum148.html)
-   -   pasting adsense code in php site (http://www.daniweb.com/forums/thread68085.html)

indianscorpion2 Jan 23rd, 2007 1:19 pm
pasting adsense code in php site
 
hello everybody!!!!!

i own a site (i dont want to mention the name....sticking to the rules of this forum)...it is designed in PHP...... it is basically a forum to download music,movies etc....

i registered myself in google adsense program and got the following code:-
<script type="text/javascript"><!--
google_ad_client = "pub-2768779675207123";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel = "";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>


i logged into my server and inserted this code in the source file index.php of my site

here index.php is the first page of my site....on which i want the ads to appear....



i got the ads but there are a few warning messages like this:-

WARNING CANNOT MODIFY HEADER INFORMATION..........................................................


PLEASE TELL ME HOW I CAN OVERCOME IT....I WOULD BE VERY GRATEFUL....


THANK YOU VERY MUCH

indianscorpion2 Jan 24th, 2007 2:24 am
Re: pasting adsense code in php site
 
cmoon..........isnt there anybody in this site who is professional enough to solve this problemm?????????????????????????????????

indianscorpion2 Jan 24th, 2007 11:16 am
Re: pasting adsense code in php site
 
these are the warning messages i am getting:-

Warning: Cannot modify header information - headers already sent by (output started at /home/indianjo/public_html/forum/index.php:3) in /home/indianjo/public_html/forum/includes/page_header.php on line 493

Warning: Cannot modify header information - headers already sent by (output started at /home/indianjo/public_html/forum/index.php:3) in /home/indianjo/public_html/forum/includes/page_header.php on line 495

Warning: Cannot modify header information - headers already sent by (output started at /home/indianjo/public_html/forum/index.php:3) in /home/indianjo/public_html/forum/includes/page_header.php on line 496

stymiee Jan 24th, 2007 4:51 pm
Re: pasting adsense code in php site
 
I've seen you ask this in just about every other webmaster forum and they have given you the answer already. You have to put this code after you send out your page headers. Actually, this shouldn't even affect PHP as it goes into your HTML and not into your PHP code.

indianscorpion2 Jan 25th, 2007 12:13 am
Re: pasting adsense code in php site
 
well actually the pages of my site have been writtten in php.....so i have asked....and i got the solution thanks....


All times are GMT -4. The time now is 1:29 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC