Thanks so much for your advice and suggestions! I will look into cURL and rajug’s php suggestions, however I do think the iframe (although not ideal) will have to do for now as unfortunately I do not really have the time to fully learn and implement these techniques.
I do appreciate your help however and you have made me welcome to the foruums Look forward to discussing again in the future…
Yes I will get permission for the data, the project hasn’t gone ahead officially yet so I haven’t spoken to the webmaster yet. But this will happen through the club and won’t be a problem getting permission. I am unsure if they actually do this sort of thing regularly (or at all) however.
I was just hoping to get some info prior to starting the project so I can get through it quickly!
First of all, be careful that whether you allowed to get the information from that another site. If it is free or if you are allowed to get the information from that site, you must have given some technical information how they provide the particular information to external uses/sites. If it is not the case and you want to grab the some portion of a web page, then it is little difficult task. You must be good in PHP and regular expression or domdocument in PHP.
I typed few lines to reply on this thread but when I clicked the submit button ‘Post Quick Reply’ it said you do not have permission to access this page. When I came back then there is nothing i typed.
FYI, if the server you use is running in safe mode, or has file_get_contents disabled for other domains, you may find yourself having to use cURL in anycase.
Well I guess I would have to embed the entire website. I imagine this would be a very quick and easy fix, although not ideal. Then I could try and gradually figure out the php method.
After you get the whole HTML as a string in a variable with that function, you have to parse that whole string/html to get some portion within it. So to do so, either you need to use regular expression (preg_match or preg_match_all) functions in PHP. To use the regular express, you must be good in it. Even I am not good enough for this. If you show us the whole output that you get from there with file_get_contents() here and let us know what exactly to be picked out from there, then some regex gurus will suggest you how to do that.
And another choice would be as I said before too, domdocument. The output HTML is in good formatted with tags, then with the help of domdocument you can traverse through the HTML elements and get a particular node/html tag and its attributes/text. See the examples there in the Manual linked in previous post. If you show that HTML output from that site, I will try to parse it with domdocument because I am not good in regular expression