From: Richard L. <ce...@l-...> - 2009-12-24 06:31:22
|
A POST over SSL (or any HTTP request over SSL) is best done with cURL. While you could, in theory, use PHP's crypt functions to handle the SSL handshake and calculate all the bits and bytes to do an SSL connection "by hand" you really really really do NOT want to re-invent that wheel. I'm not 100% sure where you want wrong with the cURL option, but it sounds like you pulled in their HTML which has a <form action="process.php" > tag, but you will need to alter that to have the FULL url to their processing page, rather than the "local" URL they put in. This is probably fairly easy to do, with a: $html = str_replace('action="process.php"', 'action="http://theirsite.com/path/to/process.php"', $html); Of course, the actual action="" parts aren't going to be that, but you get the idea. On Wed, December 23, 2009 12:47 pm, Lennie Jarratt wrote: > I need to do the following and not sure how to get it done. > > 1. Fill in form (submit) > 2. Gather the data and store it into my database (This is not a > problem) > 3. Build a custom URL string based on the form > 4. Post the new data to a https form on another site for CC entry > and > validation > > I have tried a meta redirect (has to be a post so this is not an > option). > > Tried using CURL which gives me page one on the CC site, but when I > hit > submit on that page it tries to find a local page and the not CC site > on the > other server. > > Is there a way in PHP to just do a form post submit to the secure URL? > > Thanks in advance > > Lennie > -- > Office: 847-548-4562 > Mobile: 847-302-3985 > > Twitter: http://twitter.com/ljarratt > Facebook: http://www.facebook.com/people/Lennie_Jarratt/1182350486 > > "The necessity of the times, more than ever, calls for our utmost > circumspection, deliberation, fortitude, and perseverance." - Samuel > Adams > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast > and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > chiPHPug-discuss mailing list > chi...@li... > https://lists.sourceforge.net/lists/listinfo/chiphpug-discuss > -- Some people ask for gifts here. I just want you to buy an Indie CD for yourself: http://cdbaby.com/search/from/lynch |