vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: vForums :: Support :: php - View Topic
Topic Rating: *****
Printable View
infestor1
New Member
*

Posts: 24
Status: Offline
Joined:  
Reputation: 1%  


pm
php (12th Dec 07 at 5:56am UTC)
is php allowed in headers/footers?
Ross
Administrator
*****

[Avatar]

Posts: 3,709
Status: Offline
Gender: Male
Age: 8 11
Joined:  

Additional Groups:
Support Team
***


Reputation: 45%  


pmwwwtwittergtalkvForum
Re: php (12th Dec 07 at 9:27am UTC)
Allowing PHP in the headers/footers would be a major security risk. So no, it's not allowed {Smile}

Image
infestor1
New Member
*

Posts: 24
Status: Offline
Joined:  
Reputation: 1%  


pm
Re: php (13th Dec 07 at 12:46am UTC)
awww.....

{Tongue Out}

could you sort of add "tags" so we could use like an ip. like <IP> or <BROWSER>?
Jason
Moderator
*****

[Avatar]
www.random-image.net

Posts: 223
Status: Offline
Gender: Male
Location: University of Waterloo, Canada
Age: 35
Joined:  

Additional Groups:
Spell Checker
**


Reputation: 22%  


pmwww
Re: php (13th Dec 07 at 12:56am UTC)
 
awww.....

{Tongue Out}

could you sort of add "tags" so we could use like an ip. like <IP> or <BROWSER>?


pffft... be creative {Tongue Out} Just 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/getbrowserandipinfo.php"></script> at the top of your headers or whatever {Tongue Out} . Then you can refer to those variables in scripts you use later on {Smile}

Image Randomizers - official vForums partner
Image
^ Live stats {Grin} ^
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 32
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: php (13th Dec 07 at 3:31am UTC)
 
 
awww.....

{Tongue Out}

could you sort of add "tags" so we could use like an ip. like <IP> or <BROWSER>?


pffft... be creative {Tongue Out} Just 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/getbrowserandipinfo.php"></script> at the top of your headers or whatever {Tongue Out} . Then you can refer to those variables in scripts you use later on {Smile}


Exact same as PB. {Smile}

rroll.to— Shorten a link, rickroll your friends.
Ross
Administrator
*****

[Avatar]

Posts: 3,709
Status: Offline
Gender: Male
Age: 8 11
Joined:  

Additional Groups:
Support Team
***


Reputation: 45%  


pmwwwtwittergtalkvForum
Re: php (13th Dec 07 at 9:38am UTC)
 
awww.....

{Tongue Out}

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.

Image
infestor1
New Member
*

Posts: 24
Status: Offline
Joined:  
Reputation: 1%  


pm
Re: php (14th Dec 07 at 4:38am UTC)
 
 
awww.....

{Tongue Out}

could you sort of add "tags" so we could use like an ip. like <IP> or <BROWSER>?


pffft... be creative {Tongue Out} Just 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/getbrowserandipinfo.php"></script> at the top of your headers or whatever {Tongue Out} . Then you can refer to those variables in
scripts you use later on {Smile}


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?

Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 32
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: php (14th Dec 07 at 4:48am UTC)
Your site:
Code: PHP
 
  1. <?php
  2. echo "var userIP = &#39;".&#36;_SERVER[&#39;REMOTE_ADDR&#39;]."&#39;";
  3. ?>
 


Your forum:
Code: JavaScript
 
  1. <script type="text/javascript">
  2. <!--
  3. var nScript = document.createElement("script");
  4. nScript.type = "text/javascript";
  5. nScript.src = "http://yoursite.com/ip.php";
  6. document.body.appendChild(nScript);
  7. //-->
  8. </script>
 

rroll.to— Shorten a link, rickroll your friends.
 Printable View

All times are GMT+0 :: The current time is 2:43pm
Page generated in 0.6603 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums