[Last Call] Learn how to a build a cloud-first strategyRegister Now


Extracting output from a PHP file to a HTML file

Posted on 2004-11-29
Medium Priority
Last Modified: 2008-02-20

I have a PHP script that searches for a keyword within a HTML file and returns a 'colour', e.g. colour="#00CC00". Currently, I have this running from within the HTML file that I wish to return this data to. Instead, I would like to 'call' and extract data from this PHP file to the HTML file?

Question by:eveodonnell
1 Comment

Accepted Solution

opreacatalin earned 150 total points
ID: 12698097
Technology for this is like that:
  1. An client is requesting your php file;
  2. Your php interpretor pharse the php file, which contains steps like this:
     2.1 Search for something in a specified HTML file
     2.2 Modify the HTML file (fopen, fwrite, fclose)
     2.3 Modify the header of current content page to the modified HTML file - this is tricky, don't use any output in steps above, because you won't be abble to modify header
 3. Your web server will return the modified HTML page

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This article discusses how to create an extensible mechanism for linked drop downs.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses
Course of the Month17 days, 21 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question