CURL 和下拉数组
我正在尝试通过 POST 提交表单,但是该网站有区域和城市下拉列表,下拉列表的构造如下
每个区域都有 ar 下拉列表,但它们是隐藏的,因此大多数都是region_id =>; '',但是我的帖子和他们的帖子是相同的,但它仍然说请选择一个城市,
他们的帖子
Array
(
[region] => MY04
[district] => Array
(
[MY14] =>
[MY10] =>
[MY07] =>
[MY01] =>
[MY02] =>
[MY03] =>
[MY04] => ML001
[MY05] =>
[MY06] =>
[MY08] =>
[MY09] =>
[MY11] =>
[MY12] =>
[MY13] =>
[MY15] =>
[MY16] =>
[MY99] =>
)
[streetnumber] =>
[streetname] =>
[streetname2] =>
[postcode] =>
[longitude] =>
[latitude] =>
[submit] => Next >
[hidden_listing_id] =>
[process] => 4e870291af244
)
我的阵列
Array
(
[region] => MY04
[district] => Array
(
[MY14] =>
[MY01] =>
[MY02] =>
[MY03] =>
[MY04] => ML001
[MY05] =>
[MY06] =>
[MY07] =>
[MY08] =>
[MY09] =>
[MY16] =>
[MY12] =>
[MY13] =>
[MY10] =>
[MY11] =>
)
[streetnumber] =>
[streetname] =>
[streetname2] =>
[postcode] =>
[longitude] =>
[latitude] =>
[submit] => Next >
[hidden_listing_id] =>
[process] => 4e87114ddef0e
)
已经卡在这个问题上一段时间了,有人知道为什么会发生这种情况吗?谢谢你!
I'm trying to submit a form via POST, however the website has regionand city dropdown, the dropdown is constructed like this
There ar dropdowns for each region, but their hidden so most of them are region_id => '', however my post and their post are identical, yet it still says please select a city,
Their POST
Array
(
[region] => MY04
[district] => Array
(
[MY14] =>
[MY10] =>
[MY07] =>
[MY01] =>
[MY02] =>
[MY03] =>
[MY04] => ML001
[MY05] =>
[MY06] =>
[MY08] =>
[MY09] =>
[MY11] =>
[MY12] =>
[MY13] =>
[MY15] =>
[MY16] =>
[MY99] =>
)
[streetnumber] =>
[streetname] =>
[streetname2] =>
[postcode] =>
[longitude] =>
[latitude] =>
[submit] => Next >
[hidden_listing_id] =>
[process] => 4e870291af244
)
My array
Array
(
[region] => MY04
[district] => Array
(
[MY14] =>
[MY01] =>
[MY02] =>
[MY03] =>
[MY04] => ML001
[MY05] =>
[MY06] =>
[MY07] =>
[MY08] =>
[MY09] =>
[MY16] =>
[MY12] =>
[MY13] =>
[MY10] =>
[MY11] =>
)
[streetnumber] =>
[streetname] =>
[streetname2] =>
[postcode] =>
[longitude] =>
[latitude] =>
[submit] => Next >
[hidden_listing_id] =>
[process] => 4e87114ddef0e
)
Been stuck on this for a while, anyone have any ideas why this is happening? Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过执行 [district][state] = value 来解决,对于每个 $post["district[".$st."]"] = $city;
Solved by doing [district][state] = value, for each one $post["district[".$st."]"] = $city;