I have an index page with embedded php script as follows <?php require_once(\"today.txt\"); ?> The today.txt script contains a lot of data which changes daily.But when I saw the cached page in google then I found that google has not cached the text that is being displayed by the php script.Whats the problem,is that google does not cache any text generated from require_once command or can you please suggest me some alternatives...... You can see my page at http://www.thereliableinfo.com The text generated by the php script is at the bottom scrolling box(please scroll through it to see the text.
I just checked google's cache and it appeared exactly the same as the site? I can tell you with 100% certainty that any SE related problems will not be down to your php code. Google never sees what you have in your PHP files, it sees the same as you. Your server always runs the PHP script and sends back the output, regardless of if its a search engine or user requesting the page.
I suppose you didnt look at the text in the bottom scroll box.Actually the php script in within the scroll box.Just take a relook please
You're right. My fault. I didn't see it which I think must have been the reason behind making it so small and appear empty? Either at the time google crawled your site, it was empty... or maybe it decided not to bother caching it since it was only duplicate content from other sites and hidden from the user anyway - I don't know how google's caching works so that may or not be possible. If you view the source for the page that is what is sent to googlebot and everyone browsing your site. Whether that page actually looks like that on your server, or whether you use php (or any server side script) to put together that page is impossible to tell.