#47754 [Opn->Csd]: array URL returning no parameter separater
| From: | itawadh at live dot com | Date: | Tue, 24 Mar 2009 17:48:41 +0000 |
| Subject: | #47754 [Opn->Csd]: array URL returning no parameter separater | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-135061@lists.php.net to get a copy of this message | ||
ID: 47754
User updated by: itawadh at live dot com
Reported By: itawadh at live dot com
-Status: Open
+Status: Closed
Bug Type: Output Control
Operating System: Linux
PHP Version: 5.2.9
New Comment:
no one answered
Previous Comments:
------------------------------------------------------------------------
[2009-03-23 15:52:06] itawadh at live dot com
http://sandbox.api.shopping.com/publisher/3.0/rest/GeneralSearch?apiKey=authorized-key&trackingId=7000610&numAttributes=100&numAttributesWithValues=100&&numItems=10&keyword=Fujifilm+A860&pageNumber=1
a sandbox url for the same could be as above. Please check.
------------------------------------------------------------------------
[2009-03-23 14:30:55] itawadh at live dot com
Description:
------------
Hi,
We enter a url in xml_parser functions to read and convert xml to php.
Everything seems to be working fine.
But, the Array output contains some urls as values (with
url_parameters) like http : // abc dot com / 123?ty=243&tt=564 ... etc.
Problem is that, when parsing it, we are getting url as string without
the & for parameters (so, the above sample is now http : // abc dot com
/ 123?ty=243tt=564)<- note here, an & is missing among the 243 and tt.
Please see to it and lemme update on this bug.
Reproduce code:
---------------
(here $xmldata is the xml generated with url :
http://publisher.api.shopping.com/publisher/3.0/rest/GeneralSearch?apiKey=MY_API_KEY&trackingId=MY_TRACKING_ID&productId=21267326&offerSortType=price&offerSortOrder=asc&showProductSpecs=true)
$parser = xml_parser_create ('ISO-8859-1');
xml_parser_set_option ($parser, XML_OPTION_SKIP_WHITE, 1);
xml_parser_set_option ($parser, XML_OPTION_CASE_FOLDING, 0);
if (!xml_parse_into_struct ($parser, $xmldata, $vals, $index)) {
$xmlreaderror = true;
echo "error";
}
xml_parser_free ($parser);
now if I print the $vals, it has some urls in it that have problems.
Expected result:
----------------
I need the & to appear as parameter separator in URLs returned as
array.
Actual result:
--------------
[11] => Array
(
[tag] => sourceURL
[type] => complete
[level] => 3
[value] =>
http://www999.shopping.com/pixel/noscript?PV_EvnTyp=APPVAPPV_APITSP=03%2F23%2F09_10%3A25%3A18_AMAPPV_DSPRQSID=s7.7b1f10c892d0e6c44bcbAPPV_IMGURL=APPV_LI_LNKINID=8053368APPV_LI_SBMKYW=APPV_MTCTYP=1000APPV_PRTID=144579APPV_BrnID=14305
)
this [value] us not containing any & in url
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47754&edit=1