Re: curl Question

From: Date: Thu, 04 Jan 2001 08:46:32 +0000
Subject: Re: curl Question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32619@lists.php.net to get a copy of this message
Here's the scoop on curl. 1st, if you want to use the built in curl function you have to compile php with curl personally i use curl as a standalone and exec() it out of php, not functions. to speak with an https server (ssl) you must have a protocol which can do so. php cannot do it on it's own. sure it can handle getting unencrypted web pages, but getting pages through ssl in cannot. actually, i take that back, php can talk with with an ssl server (sql_dump i believe to read what the server returns) unfortunately it can only be accesed through a url, using the GET function if you are sending variables. your broswer has built in functions to POST information to the ssl server, but that has nothing to do with the php script itself sending ssl data. so, to answer your question. if you want to POST information to a ssl web server you need to use curl, or another application capable of posting via ssl. when posting to a credit card approval sever (transaction server) most if not all require you to use the post method. i beleive the php code exchange has a couple classes on using curl to do this. if you just need to request data from another site, and the get methodis appropriate the solution is much simpler. you may want to create a new message addressing GET via SSL, as I don't have the entire answer, i just know it can be done. jason > > From: Sonia Tsui <Stsui@villamontage.com> > > Date: Wed, 3 Jan 2001 16:36:20 -0800 > > To: "'php-general@lists.php.net'" <php-general@lists.php.net> > > Subject: [PHP] curl Question > > > > Hi, > > > > Has anyone ever used libcurl with PHP? libcurl is a library that allows you > > to connect and communicate to many different types of servers with many > > different types of protocols (eg httpds). What I don't understand is when do > > we need to use curl functions. In the documentation, an example is given as > > follows: > > <?php > > > > $ch = curl_init ("http://www.php.net/"); > > $fp = fopen ("php_homepage.txt", "w"); > > > > curl_setopt ($ch, CURLOPT_FILE, $fp); > > curl_setopt ($ch, CURLOPT_HEADER, 0); > > > > curl_exec ($ch); > > curl_close ($ch); > > fclose ($fp); > > ?> > > > > This example uses PHP's CURL module to fetch the PHP homepage. But why do we > > need to use those curl functions at all?? > > I am getting so confused aboout writing client scripts which has to > > communicate with httpds. Would the standard client scripts work the same in > > a secure enviroment as in a standard one (httpd)? My understanding is that > > if I want to program clients that access secure web servers, I need to use > > say a perl module which allows me to SSL functions. If I just want to view > > web pages on https servers, I do not need this since my web browser already > > know to do that > > > > Anyone who has experience or know anything in about writing client scripts > > which talks to secure web server (httpds), please help me in clearing up the > > concepts. > > > > thanks > > ---Sonia > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#32619) next »