How can I allow the server to get HTTP request from others?
In my project, I need thingHTTP to send a HTTP get request to my website and then my website give response.
However, the server fail to give response and I am wondering whether it is a problem of cross-domain. So I add header('Access-Control-Allow-Origin: *'); but it does not work.
I ask thingspeak and they say my website is expecting the request to come from a browser. What can I do?
Here is my website: - Removed -
thanks!
-
Hello :) Could you provide some more details on the data you are fetching with your application? Is your application hosted on a local workstation, a remote server, or is it installed on the same server as your cPanel account? Are you seeking to have the application fetch the entire contents of a web page? Is "cURL" an option? Thank you. 0 -
Sorry, we change to use ESP8266 and Arduino to get the web content. And the server reply this: HTTP/1.1 200 OK Cache-Control: no-cache Connection: keep-alive Date: Wed, 06 Apr 2016 10:10:24 GMT Via: 1.1 202.140.78.212:3128 (squid/2.7.STABLE6) Server: nginx Vary: Accept-Encoding Content-Length: 910 Content-Type: text/html Expires: Thu, 01 Jan 1970 00:00:01 GMT Client-Peer: 10.6.35.16:80 Client-Response-Num: 1 X-Cache: MISS from 202.140.78.212 X-Cache-Lookup: MISS from 202.140.78.212:3128
I have no idea why this happen0 -
You may need to further consult with the developer of the application, and with your hosting provider to determine how to best obtain the data you require. You may need to use a different method of fetching the data, or your hosting provider may need to determine why the content is not fetched. Thank you. 0
Please sign in to leave a comment.
Comments
3 comments