CGI Question -- can this be done?

Yosho's picture

He has: 8 posts

Joined: May 2004

Greetings All,

I know nothing about server-side scripting Confused However, I was wondering if a very simple html document can be parsed to strip-out 1 or 2 standerd tags, then re-written to my web site.

Here's the low-down. I want to access the road conditions data provided by Cal-Trans. This is provided as a simple html file, but rather than opening the data in a new window or IFrame, I want to formate the information to be placed on my site as I see fit.

Is this hard to do, or can it even be done?

Best Regards,
Yosho

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

You can read the file and strip out tags, yes.

Did you want to provide a similar file and we can work on it together?

Basically what you do it read the file into the script, use ereg_replace (or variant) or str_replace to remove specific bits, then print the result to a different file.

It depends entirely upon on the output of the file you're reading.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.