I have to parse a page that is using javascript functions for its display and so we cant see any data in its source code.But if i save that page to my system than it shows everything in its source. Please suggest me some way out so that i can parse that page.
Un-possible! :p
Unless you have a javascript interpreter inside PHP which then compiles a new html page.
If your actual page content is generated by some Javascript code, you'll have to have that JS code interpreted to get the content -- and that's not quite that simple.
Using a Javascript interpreter from PHP (like Spidermonkey, maybe via the Spidermonkey PECL extension) might be an idea... But it will probably not work if the JS code relies on any functionnality that's provided by the browser -- and that's probably the case.
Maybe an idea might be to launch a real browser so it renders the page, and when that's done, fetch the HTML displayed by the browser ?
This could be done using, for instance, Selenium RC -- but as it requires launching an actual browser, it requires a machine with a graphical interface (i.e. not a "server"), and takes lots of time...
Still, if you don't have to many pages to scrappe, that might be a solution -- and it's certainly the way that will get you a rendering that's the closest possible from a browser... As you'll be using one ^^