Subject: | I try your php code on PHPCLASSES :... |
Summary: | Package rating comment |
Messages: | 5 |
Author: | Dominique VARLET |
Date: | 2017-10-21 07:13:54 |
|
|
|
Dominique VARLET rated this package as follows:
Utility: | Insufficient |
Consistency: | Good |
Documentation: | Good |
Examples: | Good |
|
Dominique VARLET - 2017-10-21 07:13:54
I try your php code on PHPCLASSES : « Very simple page details: Parse and extract Web page information details »
But it bugs with the site : https://fr.investing.com/indices/major-indices
Error code is : « Warning: file_get_contents(https://fr.investing.com/indices/major-indices): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in C:\wamp64\www\php-vspd\VSPD.class.php on line 56»
Can you explain me why your code doesn’t match ? Is it possible to correct it ? because I prefer your code with details extraction
zinsou A.A.E.Moïse - 2017-10-21 10:57:38 - In reply to message 1 from Dominique VARLET
Hi
First ,Thanks for your feedback and specially for your rating...I must confess that i 'm a little disappointed by your rate about the package utility and i also think it is paradoxical that you don't find it usefull but you say in your comment :<< Is it possible to correct it ? because I prefer your code with details extraction>>...
However to come back to your question, For the little i read about the http 403 forbidden statut, i think the policy(of the website you tried to reach )about the proxy server is strict.So i think you can't reach the site as long as you test the package from localhost that is seen as a simple proxy.I think the package could work fine for this site if you try it from another location because the url work directly in the browser but not when localhost try to get the page with file_get_contents or curl.The issue doesn't come from the package but from the web page.
Hope this help.
zinsou A.A.E.Moïse - 2017-10-25 18:06:26 - In reply to message 2 from zinsou A.A.E.Moïse
Hi
After our discussion, the best solution i found is to add support for http stream context to the package,i try it and this solves your issue.So i upload a new release.Maybe you could try it again and send more feedback.Once again thanks you for reporting this issue...
Regards.
Dominique VARLET - 2017-10-25 21:02:35 - In reply to message 3 from zinsou A.A.E.Moïse
thanks
zinsou A.A.E.Moïse - 2017-10-26 05:11:46 - In reply to message 4 from Dominique VARLET
You're welcome.Thanks to you.
|