astralaaron Posted February 12, 2010 Share Posted February 12, 2010 is there anyway to include php code from 1 website to another?like include a function or block of code? Link to comment Share on other sites More sharing options...
Ingolme Posted February 12, 2010 Share Posted February 12, 2010 is there anyway to include php code from 1 website to another?like include a function or block of code?There is, but it's not really safe because people will be able to see the code and spot vulnerabilities in it.Put the PHP code in a plain text file and then include that:<?php include("http://othersite.com/script.txt"); ?> Link to comment Share on other sites More sharing options...
astralaaron Posted February 12, 2010 Author Share Posted February 12, 2010 There is, but it's not really safe because people will be able to see the code and spot vulnerabilities in it.Put the PHP code in a plain text file and then include that:<?php include("http://othersite.com/script.txt"); ?> oh nice, thank you i realize the security issue it's for a personal program ! Link to comment Share on other sites More sharing options...
astralaaron Posted February 12, 2010 Author Share Posted February 12, 2010 I tried to do it, but it did not execute my function. instead it just printed the function declaration on the screen? Link to comment Share on other sites More sharing options...
Ingolme Posted February 12, 2010 Share Posted February 12, 2010 Don't forget to put the function within a <?php ?> block. Link to comment Share on other sites More sharing options...
astralaaron Posted February 12, 2010 Author Share Posted February 12, 2010 OH it works I thought i tried that actually, I must not have saved it. *Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.