Hello, If you help me as the following then, I will give you 2 one-year PR5 backlinks. What help I require is : I require the following 12 line PHP code to be converted to HTML, so that I can use it in my HTML website. Plz convert the following PHP code to HTML. <?php $browser = $_SERVER['HTTP_USER_AGENT']; $pattern = "[gG][oO][oO][gG][lL][eE]"; if(ereg($pattern, $browser)) { echo ' PASTE AD CODE WITHOUT ID HERE '; } else { echo ' PASTE AD CODE WITH ID HERE '; } ?> Code (markup): Tnx in advance. iBusiness.
your prise is useless. and that's because PHP can't be translated in html. Because PHP is server side, while html is client side. PHP instructions are processed by the server, which serves the html to the client where it is displayed. There is no way you can do that, unless you use php pages, which allow you to do this.
You can modify the following code a little bit to make it work, now give me 2 PR 5 links for a year. <script type="text/javascript"> function detectBrowser() { var browser=navigator.appName var b_version=navigator.appVersion var version=parseFloat(b_version) if ((browser=="Netscape"||browser=="Microsoft Internet Explorer") && (version>=4)) {alert("Your browser is good enough!")} else {alert("It's time to upgrade your browser!")} } </script> Code (markup):
x-noise: While PHP cannot be "converted" to HTML, there is often equivalent functionality in HTML/JavaScript (such as in this case) <script type="text/javascript"> if (navigator.userAgent.match(/google/i)) { document.write('PASTE AD CODE WITHOUT ID HERE'); } else { document.write('PASTE AD CODE WITH ID HERE'); } </script> Code (markup): This has been tested. Can you PM/post the URLs of the two sites please and I will reply with desired link URL/text. Thanks.
and if ad code is taken dinamicly from a db? usually that's the case (i work alot on such systems). what do you do then? have you noticed that "id" thingie? i tend to think that some db stuff is involved here.
Perhaps.. my initial thought was a session ID (because of the GoogleBot matching). And this looks like something very simple, I expect the code that would be inserted is static HTML (judging by the copy/paste instructions).
Tnx krt, I will give you the detailed code so that you can understand what to do. It seems that you are the winner of the 2 PR5 backlinks. Congrats.