php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44724 file_get_contents() returns wrong url
Submitted: 2008-04-14 16:43 UTC Modified: 2008-04-14 17:02 UTC
From: carlwenrich at yahoo dot com Assigned:
Status: Not a bug Package: URL related
PHP Version: 5.2.5 OS: Windows or Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: carlwenrich at yahoo dot com
New email:
PHP Version: OS:

 

 [2008-04-14 16:43 UTC] carlwenrich at yahoo dot com
Description:
------------
PROBLEM:

The file_get_contents() function returns the wrong url.

OVERVIEW:

If you point your browser to "http://finance.yahoo.com/q/op?s=A" you will get the first set of options (in this case April 2008) for Agilent. If you point it to "http://finance.yahoo.com/q/op?s=A&m=2008-05" you will get the second set (in this case May 2008).

HOWEVER:

If you use the file_get_contents() function you will get the first set regardless of which url you use. It ignores the "&m=2008-05".



Reproduce code:
---------------
$url = "http://finance.yahoo.com/q/op?s=A&m=2008-05";
$content = file_get_contents($url);


Expected result:
----------------
I expected the May 2008 options page.

Actual result:
--------------
I got the April 2008 options page.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-04-14 17:02 UTC] colder@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Can't reproduce
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Jan 23 07:03:33 2022 UTC