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 (edited) OH it works I thought i tried that actually, I must not have saved it. *Thank you! Edited February 12, 2010 by astralaaron Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now