Re: Catch result from an external web page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



AWESOME!!!
Never worked with Curl before - but looks like a solution to my problem from
what I'm reading. 

Thanks! I'll write back if I run into snags.


On 6/20/07 11:25 AM, "Robert Cummings" <robert@xxxxxxxxxxxxx> wrote:

> On Wed, 2007-06-20 at 11:16 -0400, Rahul Sitaram Johari wrote:
>> Ave,
>> 
>> Basically I¹m throwing an account number to a webpage on an external website
>> ­ And I want to catch the result in some sort ­ to find out if the account
>> number exists. 
>> 
>> Let¹s say I have this form:
>> <FORM ACTION="http://www.somewhere.com/acc.asp"; METHOD="post" NAME="frm">
>>           <input TYPE="TEXT" NAME="ACCTNUM" SIZE="20" MAXLENGTH="15">
>>           <input TYPE="HIDDEN" NAME="GOOD" VALUE="0">
>>           <INPUT NAME="frmSubmit" TYPE="submit" VALUE="Let's Go!">
>> </FORM>
>> 
>> Now when I click submit ­ the browser goes to www.somewhere.com ­ if the
>> account number is good, it¹ll bring up further option ­ if not ­ it
>> redirects to an error page.
>> 
>> www.somewhere.com is an external site ­ I don¹t have access to it¹s codes or
>> variables. 
>> I want to be able to determine if that form succeeded in getting to the
>> Account Page, i.e., the Account Number was good ­ or if it failed and
>> redirected to the error page.
>> Is there any way to do this?
>> Is there perhaps a way to read the output of that page and store it in a
>> text file?
>> 
>> Thanks.
>> 
>> PS: Anyone with an inquisitive mind ­ NO! I¹m not trying to hack someone¹s
>> website. ³Somewhere.Com² is our client and we need to hit their website to
>> determine if the account is good or not for a service we¹re providing them.
>> Right now we¹re trying to avoid requesting them for their source/code or
>> help for that matter.
> 
> Use cURL to post the form to the remote site from within PHP. Then you
> can process the resulting HTML yourself to determine if it succeeded.
> 
> Cheers,
> Rob.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux