Reply to Re: HTTP POST from PHP using a link

Your name:

Reply:


Posted by Jerry Stuckle on 11/12/64 12:00

Daniel Ennis wrote:
> trpost@gmail.com wrote:
>> On Jan 14, 3:55 pm, Manuel Lemos <mle...@acm.org> wrote:
>>> Hello,
>>>
>>> on 01/14/2008 07:57 PM trp...@gmail.com said the following:
>>>
>>>
>>>
>>>
>>>
>>>> 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,....
>>> You can try this HTTP client class. It can perform arbitrary HTTP
>>> requests without using Curl:
>>>
>>> http://www.phpclasses.org/httpclient
>>>
>>> --
>>>
>>> Regards,
>>> Manuel Lemos
>>>
>>> PHP professionals looking for PHP
>>> jobshttp://www.phpclasses.org/professionals/
>>>
>>> PHP Classes - Free ready to use OOP components written in
>>> PHPhttp://www.phpclasses.org/- Hide quoted text -
>>>
>>> - Show quoted text -
>>
>> I tried the Class and it looks to be able to send POST data to a page
>> and request back the results. I am looking to actually goto the page
>> as if you had clicked on the link. I basically created an app that
>> sometimes tries to send data to a page that exceeds the max length
>> allowed in the URL. What are options for getting around that limit. I
>> could see using a form if I had just one link, but I have hundreds and
>> can't think of a way to just send the data from the link I click on if
>> I used a form.
>
> Then what your asking to do is totally client side and has nothing to do
> with PHP. Try c.l.js.
>
> If its not doable in JS, then you need to use a form. But honestly what
> your doing is very weird, and unless this is going across different
> domains, is NOT the proper solution for what your trying to do.
>
> The only reason you should ever be doing what your trying to do is if
> your sending data from like domaina.com to domainb.com where cookies and
> sessions wont persist.
>
> If your sending this from mysite.com/page1.php to mysite.com/page2.php,
> seriously reconsider your design of this code and change it to be passed
> by session, database key, something to retrieve the data on the next
> page and not send it between POST or GET.
>

It's not good to save large amounts of data in the session - it can be
quite slow.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация