Hello there, i am sorry for wasting your time, but your assistance could help me a lot.
I am working on php script which takes information from webpages. When i trying to get html source into string with this:
[php]$url = ‘http://cs.sportsdirect.com/mens/mens-indoor-and-court-trainers’;
$str = file_get_contents($url, NULL, NULL, 10, 1250);[/php]
It writes me this error message:Warning: file_get_contents(http://cs.sportsdirect.com/mens/mens-indoor-and-court-trainers) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request - on line which starting with $str.
But when i try to get string like here:
[php]$url = ‘http://www.sportsdirect.com/mens/mens-indoor-and-court-trainers’;
$str = file_get_contents($url, NULL, NULL, 10, 1250);[/php]
It works fine. (this 2 sites are very simmilar, but one of them is in czech and second in english)
Can you please help me? I need to have information in my language.
Thank you for help!