is php allowed in headers/footers?
Allowing PHP in the headers/footers would be a major security risk. So no, it's not allowed![]()
awww.....
![]()
could you sort of add "tags" so we could use like an ip. like <IP> or <BROWSER>?
awww.....
![]()
could you sort of add "tags" so we could use like an ip. like <IP> or <BROWSER>?
pffft... be creativeJust make a PHP script that grabs the user's IP and browser's information, outputs that in the form of JavaScript variables, upload that to your PHP host, then stick something like <script src="http://myhost.com/getbrowseran
dipinfo.php"></script> at the top of your headers or whatever . Then you can refer to those variables in scripts you use later on
![]()
awww.....
![]()
could you sort of add "tags" so we could use like an ip. like <IP> or <BROWSER>?
pffft... be creativeJust make a PHP script that grabs the user's IP and browser's information, outputs that in the form of JavaScript variables, upload that to your PHP host, then stick something like <script src="http://myhost.com/getbrowseran
dipinfo.php"></script> at the top of your headers or whatever . Then you can refer to those variables in scripts you use later on
![]()
Exact same as PB.![]()
awww.....
![]()
could you sort of add "tags" so we could use like an ip. like <IP> or <BROWSER>?
Javascript can be used on it's own to work out a users browser.
awww.....
![]()
could you sort of add "tags" so we could use like an ip. like <IP> or <BROWSER>?
pffft... be creativeJust make a PHP script that grabs the user's IP and browser's information, outputs that in the form of JavaScript variables, upload that to your PHP host, then stick something like <script src="http://myhost.com/getbrowseran
dipinfo.php"></script> at the top of your headers or whatever . Then you can refer to those variables in
scripts you use later on![]()
pffttt...
how do i do that?
i only know how to do $blah = kaboom; in a php script, not var blah = kaboom;
is it possible to do js style variables in php, then use those js variables?
like this:
<?php
var ip=$_SERVER['REMOTE_ADDR'];
?>
then upload that as script.php then:
<script src="script.php"></script>
then use:
<script type="text/javascript">
document.write(ip);
</script>
would that work?
or something else?
Your site:
Your forum:Code: JavaScript
- <script type="text/javascript">
- <!--
- var nScript = document.createElement("script");
- nScript.type = "text/javascript";
- nScript.src = "http://yoursite.com/ip.php";
- document.body.appendChild(nScript);
- //-->
- </script>