473,387 Members | 1,553 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

PHP HTTPS POST Como hacer un POST https con PHP

http://wedoit4you.com/forums4you/dis...?Msg_pk_id=628

/**
Author: Ing. Angel Leon
Function: postHttps($url,$params)
Given the full URL of the Target and The Params it
will POST the params even
if passing an HTTPS URL.
Returns whatever the URL returns.
*/
function postHttps($url,$params) {
$ch = curl_init ($url);

curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $params);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec ($ch);
curl_close ($ch);

return $result;
} //end postHttps

//Sample of usage.
//Suppose you want to submit credit card information and your merchant
account
//loggin and password, but you dont want ur login and password to be
on the
//HTML form as hidden fields... you need a script that posts all
//this information directly to the ending cgi/dll/script through
HTTPS...

$url='https://creditcard.net/transact.dll';
$params='cc=33442342323&cc_exp_date=0304&amount=15 0&merchant_login=our_login&merchant_password=our_p assword';

postHttps($url,$params); //LISTO!!!

By Angel Leon
Jul 16 '05 #1
0 5328

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Paul Sweeney | last post by:
Does anyone know of a working (python) https proxy which allows viewing of unencrypted data being sent from my browser to an https site? I've worked my way through most on the list at...
1
by: dave | last post by:
Hello I have one simple form (myform.asp) and it posts to query.asp I had put below code in both file on top of the page to redirect this two pages in https:// so any one can access it thru http...
0
by: Luis Esteban Valencia | last post by:
www.isohunt.com Hagan una busqueda por cualquier cosa y en la lista de resultados hagan click en una fila y veran como se despliega dinamicamente algo entre 2 filas con un interesante efecto' ...
1
by: David Roza | last post by:
Groups Home | Help | Sign in Web Images Groups News Froogle Maps more » Advanced Groups Search
2
by: denet iglesias | last post by:
hola: yo quisiera saber como puedo hacer que un panel se ponga transparente poco a poco, pero que ademas se pongan transparentes los controles que estne dentro de el, por ejemplo un picturebox y un...
2
by: Cristobal | last post by:
Hola tengo un problemilla, necesito saber que evento es llamado al hacer click sobre una de las filas del gridview. Lo necesito para poder sobreescribirlo y hacer una redirección dentro de él. ...
2
by: Arti | last post by:
Hi, I am trying to access a servlet hosted on Tomcat server using HTTPS Post protocol. I am getting the exception: "The underlying connection was closed: Could not establish trust relationship...
0
by: librosur08 | last post by:
Como obtener datos del gestor de correos predeterminado y el puerto SMTP Tengo una aplicación que envía por correo una tabla convertida en archivo de texto de delimitación fija y me gustaría que...
4
by: goosfancito | last post by:
hola. Quiero saber como hacer para identificar de que tipo es un archivo, como ser: quiero que el usuario seleccione un archivo excel y despues poder verificar que asi es y que no es un archivo...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.