Hi, I want to make an include to my myspace. I have a code that works fine on other own page I have.
The include statement is:
<?PHP include ('http://www.albertforns.com/easycounter_myspace.php'); ?>
which I have inserted on a style script inside a profile code in my own myspace...
It does'nt work, as if the include is (as it might be) into a .htm file instead of a .php and cannot be executed.
I had this problem with other pages since I discovered that you have to include php files in files which have .php extension, but as you can imagine, in myspace you cannot to know which extension are the parent files and the php execution control and so on....
can you help me?
THANKS
Is it possible to include a PHP file to the MYSPACE ?
Moderator: General Moderators
-
albertforns
- Forum Newbie
- Posts: 2
- Joined: Fri Jun 27, 2008 12:11 pm
Re: Is it possible to include a PHP file to the MYSPACE ?
With include(), you can only include local files. You have to use file_get_contents().
-
albertforns
- Forum Newbie
- Posts: 2
- Joined: Fri Jun 27, 2008 12:11 pm
Re: Is it possible to include a PHP file to the MYSPACE ?
mmm interesting! thanks
are you telling me that file_get_contents() would work exactly as if I include? my 'included' script has a coutner and file I/O operation and a kind of "echo $count"... does it all will run?
thanks
are you telling me that file_get_contents() would work exactly as if I include? my 'included' script has a coutner and file I/O operation and a kind of "echo $count"... does it all will run?
thanks
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Is it possible to include a PHP file to the MYSPACE ?
myspace will not allow the execution of php code on their website, nor would any site with sensible security. I would suggest creating an iframe and loading your page from there.