473,396 Members | 2,109 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

dynamicaly creating .htm pages with php

tolkienarda
316 100+
hi all
i want to be able to create a .htm file using php. i don't know if this is even possible. am wanting to create a site that has the functionality of php but the google searchability of a static .htm site.
so i will need to create .htm's and populate them with code now if this isn't possible in php then is there a language i can do it in

thanks all

eric
Mar 23 '07 #1
5 1301
michaelb
534 Expert 512MB
PHP is a server-side language, and it is perfectly suited for writing dynamic web pages.

This is a very simple example of such page, where some contents (date/time) is dynamically generated every time your browser requests the page.

Expand|Select|Wrap|Line Numbers
  1. <head>
  2.   <title>Hello!</title>
  3. </head>
  4. <body>
  5.  
  6. <?php
  7.    echo date('r');
  8. ?>
  9.  
  10. </body>
  11. </html>
  12.  
In real life much of dynamically generated contents comes from the database.
Mar 23 '07 #2
tolkienarda
316 100+
hi
i don't think i was clear in my question. i am creating a page for a realastate company that they add listings to in a form and i have a php page that will display the correct listing based on the link they click on. but google cannot search within the contents of a database so what i would like to be able to do is create .htm file every time a listing is added that will contain all of the the text that is displayed in the .php page for the sole pourpose of google searchability. so somthing like the imagecreatetruecolor() function and only rather than creating an image file i would like to create a .htm file then write to it using somthing like the fwrite() function.
if my question still isn't clear please ask any questions about it

eric
Mar 25 '07 #3
michaelb
534 Expert 512MB
Thank you for clarification.
I have to say that I have only a cursory knowledge in this area, perhaps someone else will take a lead here.

But if I could say what I think, you may be heading in a wrong direction.
It may take weeks (or months) before Google updates its database with your new html contents. By that time the house can be long gone from the market.
Also there are other reasons which make this idea less than appealing.

And what do you expect people would enter for a search string, a specific street address of the house?
I would guess that in most cases people run queries with something like "real estate Boston", (19600000 hits), or "House sale Munich" (1240000 hits)

If this is the case you may only need to use the meta-tags/keywords, and if not done this already - submit your site to major search engines. Many hosting companies do it for their customers.
Mar 26 '07 #4
tolkienarda
316 100+
thanks for your advice i am from backward nowhere i will present these arguments and ideas to my boss but i think she will still want the .htm pages.
thanks again

eric
Mar 26 '07 #5
michaelb
534 Expert 512MB
Eric, you are welcome.
If you still have to do it I don't think there will be any real problems code wise, PHP should give you all necessary means and ways.

Perhaps you could run a little experiment first - create a new static html page and see how long it'll take before Google has it indexed.

There are many sources on the net that can give you a good overview of how search engines work, here's just one of them:
http://www.metamend.com/things-searc...-look-for.html
Mar 27 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: minigitoo | last post by:
Hi I try to get dynamicaly all requests made to DB2 I process like this: 1) I stop then start my instance of database in the db2 control center 2) I use : db2 update monitor switches using...
2
by: LIN | last post by:
Hello, Greetings. I am creating a web site which will contain lot of articles. I had been planning to create simple HTML page on the server everytime i posted a article (eg. article12.html )....
2
by: Marc Nederhoff | last post by:
Hi all, Is it possible to add the <link rel="stylesheet"....> dynamicaly. All pages in my site use the same style sheet, and I don't want to add the link manualy because of maintenance. Marc
7
by: moondaddy | last post by:
I want to dynamically create a JavaScript file and cache it on the client for re-use. I know how to write javascript to a web page from the code behind, but I don't know how to actually create a...
3
by: leon | last post by:
hello friends, i am writing a page aspx and creating controls dinamicaly and then i must to create for each control the events as well. Anybody to know how????? happy day lion
2
by: Achim Domma (Procoders) | last post by:
Hi, to allow my user to select from a list of values which are calculated on the fly, I tried to generate a list of LinkButton controls on the fly. But the connected event does not fire. ...
3
by: mukeshgupta.WD | last post by:
i am developing a website in which i want to call a html page load into a div tag dynamically followed by link. i want to change the html page every time when a link is clicked. can any body have...
5
by: sam | last post by:
Hi all, I am dynamically creating a table rows and inerting radio buttons which are also dynamically created. Everything works fine in Firefox as expected. But I am not able to select radio...
6
by: Lucas Ponzo | last post by:
I nedd depending on thr user loged in, that the menu binds to a different site.map file ... can I have multiple site maps in my ASP.NET 2.0 app and change the file that the SiteMapDataSource is...
1
by: leenadiwan | last post by:
Hi All!! We want to create a hyperlink dynamically in an html table TD. We have tried the following and evenon some internet sites the code examples are samilar but the adding to the td part is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.