I beg aid to the master php, I was publisher of google and Bidvertiser. My question: how to get google ads do not appear in search results on my blog, for example: www. findlookup.in/?s=s*x .com if anyone can help me, I will give a memento as a token of my gratitude.
So you want the ads to not appear on the results pages if so something like this may work (In the example below I borrowed the ad code from your site in your signature) <?php //echo substr(rawurldecode($_SERVER['PHP_SELF']), 1, 2).'<br>'; #echo to find URI sub-string match if(substr(rawurldecode($_SERVER['PHP_SELF']), 1, 2)!=='?s'){ echo ' <!-- Begin BidVertiser code --> <SCRIPT LANGUAGE="JavaScript1.1" SRC="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=334031&bid=1223526" type="text/javascript"></SCRIPT> <noscript><a href="http://www.bidvertiser.com">internet marketing</a></noscript> <!-- End BidVertiser code --> '; }else{ echo 'IN HTML - ANOTHER AD NETWORK, YOUR OWN AFFILIATE LINKS, AN IMAGE OR LEAVE BLANK!'; } ?> PHP: The code is basically asking itself if from http://www.example.info/?s=example.com the '?s' is not present in its page URI sub-string. If so ie: the '!==' operator match is not identical to the '?s' URI sub-string then it returns true (a non-match) and hence echo's out the first channel, the HTML ad code— this will happen if you are on any other page on site (including the index page) that is not the results page. However if the operator returns false ie: the opposite of '!==' in other words matches identically the '?s' in the URI sub-string the script will echo out the second channel where you can place any other HTML (or none at all)— this will happen if you are only on the results page on site, excluding index page and all other pages. I need to point out you'll probably need to place this directly into the core of your script to get it's functionality working unless of course you have provisions in your CMS for php input/editing. ROOFIS
Yeah that would work too as it will return true if no data is set in the query string— however this would work with form submission URI's strings only. To note urldecode is there for normalizing URI data if special chars where present which would allow correct readability for the opening boolean, probably an overkill and maybe not even needed. I wrote that opening boolean to handle all URI string types, form data or not, dynamic or static URI's or any other mainly for versatility for any webpage, but if the OP wants it for from data only then the !isset option is more to the point. ROOFIS