I'm having a trouble on my site. I have my own script which counts how many times the ads display in a page using php script, which always run every page refresh without any condition and it sums up the ads to 2million+ page views. but on my google analytics the page views is only at 100k+. How does the google ads pageview works? is it have a special condition like ip per count? or for a specific ip there is a certain x amount of time to add it to count?
For Google Adsense there is a ip limit.
For example if a client makes some fast hits (5 - 10), his ip is banned for a short time (1 - 2 minutes) and no more ads will be shown, or cached ads that are not counted as impressions will be served.
Also if the client uses ad blocker software (we all hate this), no ads are shown, and they are also calculated by your counter.
Finally if your pages contain errors it is also possible that not all impressions are shown on Google Adsense reports.