| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| DesignersTalk > Re: Query another relative site's information ... |
|
LinkBack | Thread Tools | Search this Thread |
|
|
#1 (permalink) |
|
Registered User
Join Date: Nov 2004
Posts: 1
|
Hello, I was curious to see if anyone knew of a way to grab another relative site's database information to a site being built presently that is owned by the same company. They just want to grab the parts and quantity off of the main sites database within the html or php being used rather from the main sites database itself. Unless that is the only way you can do it , is by connecting to the main sites database. I just thought there was a way to grab or spider information from one site and place that dynamically on another relative site. Is there a method or way of doing this securely and with PHP . I was thinking grabbing the information from the main site and having it placed dynamically into a newly created database which will then be echoed onto the new relative site. Are you confused yet? sorry everyone... thanks, take care. AKA Bearslife |
|
|
|
|
|
#2 (permalink) |
|
Registered User
Join Date: Mar 2004
Location: Derby, UK
Posts: 24
|
Yes it is possible (called screen-scraping usually), but it is quite likely to be a performance headache at best and downright flaky at worst, so a solution that accesses the db or a duplicate of it would be better usually. If you still want to do it, the general method is to open the remote url using fopen (assuming this is supported on your installation as it can be switched off) then read the string you get back looking for the relevant data. How easy it will be to get the data you need will depend on how complicated and how well formed the html of the original site is. Of course if you don't control the other site's layout your site might suddenly stop working when they change the layout of the other site, but since the same company owns both I guess that will not be a problem. HTH, Dai |
|
![]() |