Forum Moderators: open
He wants to have static htm pages but a small area will
need to display upto date info. He wants to do this by
using a Php read me include.
So we have our web page optimised and in it will be a php script that tells the server to grab some content from another server.
My question is does google accept this?
I generally stick to plain html but I am facing an ever increasing demand for more interactive pages that rank well.
Its a big head ache can any one advise?
We've had lots of discussions about dynamic urls, etc - I highly recommend trying the site search [webmasterworld.com] & some keywords like, "google dynamic url".
Cheers. :)
I read the initial post as wanting to do something like:
1) have a file with a php extension such as file.php
2) with in this file have something like
<HTML>
<body>
Static HTML Stuff<? include("someotherfile.inc");?>
</body>
3) file.php would be dynamic because the content of someotherfile.inc would be changed on a regular basis or would have some script that would open and parse some dynamic content
lasko, if this is what you are talking about, Google won't even see the php include - php is all preproceesed by the server. In fact, if you wanted, you could completely hide that you are using php by setting up your server to parse *.html files.
It's good to get all the bases covered at once, instead of having to go back to the script later & fix it, ya? :)
Any scripting language will work as figment88 said with Google, perl, Asp, cold fusion, jsp, asp.net, etc.
As long as the output is html, text, pdf, excel, ms word, or any of the other file types that Google indexes, you'll be fine.
Parameterized URL strings are bad for Google but it is getting much, much better at them.
There are many ways to have dynamic sites without paramaterized URL strings.
BTW, a parameterized URL string just means that there is a question mark after the file name followed by name-value pairs, such as
[somesite.com...]
If the above is correct I guess the answer to laskos questions are..
1. yes its very easy and no hassle
2. google would not see any difference from if you changed the included content manually on each page.
3. Whether it is seen as duplicate is another question, depending on how large the include is as a proportion of page size, how many pages it is inlcuded on, and whether you robot.txt or htaccess out, or put on a non-public section of the server the original file so its not able to be seen independently.
here is an example of what to do with the div.
<div id="nell"> </div>
now here's how you use the javascript to dynamically write to it.
var theCode = "<p><font face='Arial' color='#003366' size='2'>write update text and html here to put in your "nell" div</font>"
if (ie4¦¦ie5¦¦ie6)
nell.innerHTML=theCode;
else if (ns6)
document.getElementById('nell').innerHTML=theCode;
including inside page is fine, bots won't even know because it is server side as chiyo said.
On the other hand if you start passing vars around and including different content based on passed params then you need to be very careful.
I generally stick to plain html
no prob, mine all look like plain html, my dynamic sites serve nice clean html but are dynamically created. No worries lasko, I know a place you can get some good help
Perl and PHP CGI Scripting [webmasterworld.com] ;)