| | |
retrieving live information from other sites
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
absolutely! There is a lot of material out there on the subject, so expect to spend some time learning some new tricks.
there are several ways to go about doing it. For a simple introduction to PHP and XML check out http://www.kirupa.com/developer/php/php5_simpleXML.htm
In that example, just replace the path of file_get_contents with the path to the remote XML file you want to use.
for example:
Of course you can parse XML entirely without PHP if you are interested in learning / already know XSL (more on this at w3.org: http://www.w3.org/Style/XSL/)
if you just want to include content from other sites (i.e. an entire webpage) you can just do something like:
then you can try and hack up the code however you want...
there are several ways to go about doing it. For a simple introduction to PHP and XML check out http://www.kirupa.com/developer/php/php5_simpleXML.htm
In that example, just replace the path of file_get_contents with the path to the remote XML file you want to use.
for example:
php Syntax (Toggle Plain Text)
<?php //Since we're already using PHP5, why don't we exploit their easy to use file_get_contents() command? $xmlFileData = file_get_contents("http://www.howtocreate.co.uk/operaStuff/userjs/samplexml.xml"); //Here's our Simple XML parser! $xmlData = new SimpleXMLElement($xmlFileData); //And here's the output. print_r($xmlData); ?>
Of course you can parse XML entirely without PHP if you are interested in learning / already know XSL (more on this at w3.org: http://www.w3.org/Style/XSL/)
if you just want to include content from other sites (i.e. an entire webpage) you can just do something like:
php Syntax (Toggle Plain Text)
<?php //get google.com $fileData = file_get_contents("http://google.com"); //do something with fileData here echo $fileData; ?>
then you can try and hack up the code however you want...
•
•
Join Date: Feb 2008
Posts: 4
Reputation:
Solved Threads: 0
i'm trying to retrieve some "live" movie times to add on my website, but it's all in flash.
is there a way to get around that? do you know how movie searches are accomplished?
do they contact the actual headquarters for access to parts of the database or do they
obtain info by parsing their site?
,learning slowly
is there a way to get around that? do you know how movie searches are accomplished?
do they contact the actual headquarters for access to parts of the database or do they
obtain info by parsing their site?
,learning slowly
I'm not sure which site you mean is in flash...your site or the site you are trying to get the show times from? If you are trying to integrate dynamic content into your flash, then you might want to check out articles regarding XML in Flash, such as this one. There are a lot more out there, so poke around.
I'm not certain how movie times are aggregated, but if you google a bit with the terms 'movie times rss' or 'movie times xml' etc., you should be able to uncover some details.
I'm not certain how movie times are aggregated, but if you google a bit with the terms 'movie times rss' or 'movie times xml' etc., you should be able to uncover some details.
•
•
Join Date: Feb 2008
Posts: 4
Reputation:
Solved Threads: 0
this is the website that i'm trying to obtain movie information from:
www.cgv.co.kr
the website is all in flash
is it possible to obtain information from websites like this one if they do not provide
RSS Feed?
www.cgv.co.kr
the website is all in flash
is it possible to obtain information from websites like this one if they do not provide
RSS Feed?
•
•
Join Date: Jan 2008
Posts: 57
Reputation:
Solved Threads: 5
•
•
•
•
is it possible to obtain information from websites like this one if they do not provide RSS Feed?
Is there another site for Korean showtimes (like Fandango in the US)? Unless they're printed in HTML or XML, you're not going to be able to extract them from a site and re-use them.
As for sites that get the info directly from the movie theaters, they most likely have access to a central database. Sites with lots of info (like Amazon.com) give out read-access to parts of their database, so that developers can integrate the information into their site.
I'd assume there's some kind of high-level database for cinemas, and that's where sites like Fandango, Enjoytheshow, etc. get the movie times.
- Walkere
![]() |
Similar Threads
- LU 1860 &1862 symantec errors (Viruses, Spyware and other Nasties)
Other Threads in the PHP Forum
- Previous Thread: using Onchange() in PHP
- Next Thread: php validator
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access action ajax apache api array auto beginner binary broken cakephp checkbox class cms code cron curl database date directory display domain download dynamic echo email error errorlog fatalerror file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla limit link load login loop mail masterthesis menu mlm mod_rewrite multiple mysql oop parse paypal pdf php popup problem query radio random record recursion regex remote script search security server sessions sms soap source space sql structure syntax system table tutorial update upload url validation validator variable video web xml youtube





