0

I'd like to get the text on this page: https://cvo-v025.cvo-zwfryslan.nl/display/ToonBerichten.aspx?uid=ctl14&pid=723df4e4-248f-4df6-b3ad-751b410daab7&id=1c76d69d-d858-44d9-8a47-e65e9f294898

Php cUrl isn't working, YQL isn't working (but didn't give an error), javascript didn't work, the error message was:

XMLHttpRequest cannot load https://cvo-v025.cvo-zwfryslan.nl/display/ToonBerichten.aspx?uid=ctl14&pid=…3df4e4-248f-4df6-b3ad-751b410daab7&id=1c76d69d-d858-44d9-8a47-e65e9f294898. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://--------.nl' is therefore not allowed access. 

Is there a way for me to get the text from that page?

RuteNL
  • 197
  • 14
  • a simple copy and the paste in your application? – Daniele94 May 22 '14 at 13:53
  • you can't fetch data from OTHER servers via javascript. That'd be a cross-site-request and they're blocked for security reasons. – Marc B May 22 '14 at 14:11
  • Your question lacks any information that might help people determine why your attempts to use PHP+cURL or YQL are failing. Your third approach can be dealt with via the duplicate question. – Quentin May 22 '14 at 14:13

1 Answers1

0

The page you're trying to fetch text from actually makes a POST request to another resource to fetch the text via XHR. When you open Firebug or similar, you should see the POST request, its URL and response. It would appear that you need to have a session on the site to actually fetch anything, as making a POST request to that URL fails to retrieve anything useful.

Copying the request as CURL does yield a working terminal command, along with all sent headers, but I doubt it will be helpful if you wish to do this programmatically.

mingos
  • 23,778
  • 12
  • 70
  • 107