|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Need help pasting google ADsense code in my php site
hello everybody!!!!!
i own a website which is designed in PHP......... i registered myself in google adsense program and got the following code:- 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="(URL address blocked: See forum rules)"> </script> i logged into the control panel of my site which contains all the source files..... i pasted the code in the index.php file so as to get the ADS on the home page of my site....... i got the ADS but there are these warning messages as well:- WARNING:CANNOT MODIFY HEADER INFORMATION................ can anyone please tell me how to get rid of these warning messages......... it is looking shabby to the users who visit my site.......... i dont want the ads to be vanished.....i just want to remove those warning messges....... any help would be greatly appreciated.....thank you.... |
|
#2
|
||||
|
||||
|
put in PHP forums
__________________
Akash Dwivedi "Whatever the mind can conceive and believe, the mind can achieve." Feel good.. ![]() |
|
#3
|
||||
|
||||
|
I think you might have changed the code that is the reason you are getting warning message, pl note changing and alteration of adsense code is against their TOS, Use the html editor without making any change and paste it intact.
|
|
#4
|
|||
|
|||
|
hi
hello....i didnt do any sort of alterations watsoever on the code google sent me.....
i just copied it and pasted it as it is......... |
|
#5
|
|||
|
|||
|
these are the error messages i am getting on my home page:-
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 |
|
#6
|
||||
|
||||
|
You pasted the Google code in a location prior to when headers are sent. PHP functions such as session_start() and header() must be the first output sent to the browser and wherever you pasted your Google code, you did so before one of these calls.
|
|
#7
|
|||
|
|||
|
thank you for the reply Mr.andrastea.......
wat do u suggest i do then??????? |
|
#8
|
||||
|
||||
|
Quote:
Put any AdSense code *after* any headers are sent to the browser. |
|
#9
|
|||
|
|||
|
thank you verymuch sir.....i did wat u told me to and i got the ads without those warning messages.........thank you very much......
|
|
#10
|
||||
|
||||
|
indianscorpion2, sound good you have fixed the problem,
just be careful don't click on your ad! Wish you best of luck! ![]() |
![]() |
| Viewing: Dev Shed Forums > Web Site Management > Business Help > Need help pasting google ADsense code in my php site |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|