0

I'm trying to get the source code from this page, to get the code of the timetables, and then parse it.

But when I fetch it with file_get_contents, the div I'm looking for is empty. I searched in the code, and it looks like it's filled with jQuery when to body is loaded.

So my question is : how can I get the source code of the page after the jQuery is executed ?

Thanks.

2 Answers 2

2

Since jQuery is javascript, php's file_get_contents will not help because it does not execute javascript.

Either find out which ajax data they load and use them directly, or use a browser ;)

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your reply. I noticed that file_get_contents just gets the text of the page. @mars find a way to fetch the datas.
1

the information you want comes from this page http://www.cinesion.ch/cinesion/timetable.php through an AJAX request so file_get_contents will never get it unless you do the call directly to this page...

try this one http://www.cinesion.ch/cinesion/timetable.php?date=%&movie=%&city=%&_JEXEC=1

1 Comment

I just want to fetch the timetables, then insert them in a database. After that I have coded an Android application that is displaying the movies for today, or any specified days. I am currently fetching the datas from cinesion.ch/mobile, but there isn't all the timetables, just for 2 or 3 days.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.