Replacing and viewing a certain area of a text file.



megaboy said:
A while back I found a php script that it could read and write info between tags in a .txt file. Such as: <Viewinfo>Blah Blah</Viewinfo>

... and? You just wanted to share that? You want us to find it again for you? You want to know how to write such a script? What??
may be that file was not .txt but .xml to parse xml pages in php :?: :arrow:
Welcome to the World of parsing

You need to first read the whole content of the file
and then parse the file to see where that tag starts and then where it ends, pick the info between it

Can google for some php script for parsing!
parsing .... :roll:
a plus point will be regular expressions
you can do a lot of parsing stuff with RE's :wink:
If you happen to be looking for HTML (or HTML-like tags, e.g. <x></x>), then the DOM XML functions will come in handy. XPaths are a particularly powerful tool.