来自PHP的HTTP POST使用链接 [英] HTTP POST from PHP using a link
问题描述
我正在寻找一种方法将数据从一个页面发送到另一个页面作为POST
数据而不使用表单或cURL。
我有一个php在单击链接时将页面列表从页面传递到
的脚本。这在大多数情况下工作得很好
作为链接,但有时列表变得非常大并被切断。
它被切断的原因似乎是限制可以在URI中传递的数据。
看起来我可以用cURL执行此操作,但此脚本将在
几台没有编译cURL的服务器我不想现在重新编译
。
我发现了一些帖子说这可以用PHP和javascript完成,
但是我找不到好的例子。
为了举例说明我在做什么:
< a href = case_details.php?cases ="。$ allCases。"& priority = Low& PG = All>
$ count< / a> ;
$ allCases是一个以逗号分隔的数字列表,可以变得非常大。
即84638,48957,58945,45375,....
谢谢!
allCases。"&优先级=低& PG =全部>
count< / a>
allCases是一个逗号分隔的数字列表,可以变得非常大。
即84638,48957,58945,45375,....
谢谢!
I am looking for a way to send data from one page to another as POST
data without using forms or cURL.
I have a php script that is passing a list of cases from on page to
another when a link is clicked. This is working fine for the most part
as a link, but sometimes the list gets very large and gets cut off.
The reason it gets cut off appears to be a limitation on the amount of
data that can be passesd in the URI.
It looks like I can do this with cURL, but this script will run on
several servers that do not have cURL compiled in and I do not want to
recompile now.
I found a few posts that say this can be done with PHP and javascript,
but I found no good examples.
To give you an example on what I am doing:
<a href=case_details.php?cases=".$allCases."&priority =Low&PG=All>
$count</a>
$allCases is a comma separated list of numbers and can get very large.
i.e. 84638,48957,58945,45375,....
Thanks!
allCases."&priority =Low&PG=All>
count</a>
allCases is a comma separated list of numbers and can get very large.
i.e. 84638,48957,58945,45375,....
Thanks!
这篇关于来自PHP的HTTP POST使用链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!