CuRL Registration CuRL Registration
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

CuRL Registration

Started by buddybuddha, August 15, 2005, 02:22:42 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

buddybuddha

For my site I am doing my registrations through CuRL so that I can have all my various services integrated.  When I run the following script with input from an html form, however, instead of a registration I get a view of the agreement.  How do I stop this from happening?

$ch = curl_init("http://www.buddybuddha.net/Version3/PhotoGall/register.php");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'username=' . $user . '&password=' . $pass . '&password_verification=' . $pass . '&email=' . $mail);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_REFERER, "http://www.buddybuddha.net/Version3/PhotoGall/register.php");
curl_exec($ch);
curl_close($ch);

Nibbler

Add an extra post field for 'submit'

buddybuddha

#2
Well actually, the question that would solve this program is, "How does Coppermine's register.php recognize which part of the code to execute?"

Nibbler

If the request includes a 'submit' POST field then it processes the data, if it does not it will show the disclaimer. There's also code to take care of activation but that is irrelevent. Take a look at the source code, it's fairly straightforward.

buddybuddha

Ive been looking at the source code and I just noticed that at the bottom.  So are you saying to change

curl_setopt($ch, CURLOPT_POSTFIELDS, 'username=' . $user . '&password=' . $pass . '&password_verification=' . $pass . '&email=' . $mail);

to

curl_setopt($ch, CURLOPT_POSTFIELDS, 'username=' . $user . '&password=' . $pass . '&password_verification=' . $pass . '&email=' . $mail . '&submit');

?

I apologize for being so novice with this.  My native language is Perl and I do very liitle work with postfields, headers, etc.

buddybuddha

Never Mind All That I got it Working.  Thanks for the help!