belledumonde
08-18-2006, 06:35 AM
hello! i've done some searches on this but most of the stuff i find are to do with including dynamic files and other such advanced PHP which i neither understand nor need. im just a beginner with PHP and actually, this is all im using it for.
so my question is, can i include a .htm file if its on a different server as the php file?
im doing it this way because my hosting service doesnt allow SMTP, and the service i hosted the PHP script on, has ads and ruins everything.
here's the relevant part of the script:
if(!$name) {
include "header.htm";
echo "<p> <span class=\"warning\">Please provide your name
so that we know who you are;</span><br />
and kindly enter a valid e-mail
address so we can get back to you.</p>\n";
include "form2.htm";
} else if(!$email) {
include "header.htm";
echo "<p>Please provide your name so that we know who
you are;<br /> and <span class=\"warning\">kindly enter a valid
e-mail address so we can get back to you.</p>\n";
include "form2.htm";
where it says include "header.htm"; and include "form2.htm" i want to include files hosted on a different server. i tried doing include "http://taglehomes.awardspace.com/header.htm", same for the form2.htm, but it doesnt work.
how do i make it work?
thanks:)
so my question is, can i include a .htm file if its on a different server as the php file?
im doing it this way because my hosting service doesnt allow SMTP, and the service i hosted the PHP script on, has ads and ruins everything.
here's the relevant part of the script:
if(!$name) {
include "header.htm";
echo "<p> <span class=\"warning\">Please provide your name
so that we know who you are;</span><br />
and kindly enter a valid e-mail
address so we can get back to you.</p>\n";
include "form2.htm";
} else if(!$email) {
include "header.htm";
echo "<p>Please provide your name so that we know who
you are;<br /> and <span class=\"warning\">kindly enter a valid
e-mail address so we can get back to you.</p>\n";
include "form2.htm";
where it says include "header.htm"; and include "form2.htm" i want to include files hosted on a different server. i tried doing include "http://taglehomes.awardspace.com/header.htm", same for the form2.htm, but it doesnt work.
how do i make it work?
thanks:)