CuRL Registration CuRL Registration
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

CuRL Registration

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

Previous topic - Next topic

0 Members and 2 Guests 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!