So what i'm requesting would probably work best if there was a rss feed for the source that i'm taking information from ... but that source doesn't have rss. So I'll have to do things manually :/ This is just a small project i'm doing for class, for a website like: http://osoc.berkeley.edu/OSOC/osoc?...nits=&p_restr=&p_info=&p_updt=&p_print_flag=Y or http://osoc.berkeley.edu/OSOC/osoc?...g=&p_units=&p_restr=&p_info=&p_updt=&x=36&y=9 I want to be able to extract all the info on that page & re-display them (ie reformat how the information is displayed i guess). I can format the data once i've gotten it...my only dilemma right now is how to extract the information in such a way that it'll be reusable?
use file_get_contents to retrieve the content, and you can then use a regular expression to parse out all of the data
thanks! but now another problem, how do I extract the html contents from and to only a certain section? so say for something like: http://osoc.berkeley.edu/OSOC/osoc?...=&p_units=&p_restr=&p_info=&p_updt=&x=34&y=14 i don't want all the html/contents, i just want the part that actually lists the schedules. Is that possible? Also, i'm guessing I would use the strip_tags to strip the html codes I don't want from the extracted result? My little program does only the following: allow user to make a schedule search, fetch the actual result from the berkeley schedule site, then strips html tags unneeded and then display everything else on a new page - that's all possible within the realm of PHP right?
Depending on the structure of the page you can use the php function 'explode' It will enable you to break the page up into sections and put them in an array. Hopefully that gives you an idea?