Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Website side:
- $dB->query("INSERT INTO Me_MuOnline.dbo.forum_tmp (forum_fid,forum_nick) VALUES ('".$_SESSION['username']."','".$userid."')");
- extract($_POST);
- if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
- $_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"];
- }
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL,"http://forumurl/process.php");
- curl_setopt($ch, CURLOPT_POST, 1);
- $titkoskod='e2KULYiT0Zy~KT5l3J280cWO\6I5jh7s6NRHdYwTnH59po6aVz3GG0LEm2n4I5[trKEqJ$xX2yldw2%xQiQnnZhFV01]*zYy2Hxq';
- curl_setopt($ch, CURLOPT_POSTFIELDS,"username={$userid}&user_password={$memb__pwd}&user_email={$mail_addr}&ip={$_SERVER['REMOTE_ADDR']}&titkoskod={$secret}");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- $server_output = curl_exec ($ch);
- curl_close ($ch);
- header('Location: https://forumurl/');
- exit();
- Process.php:
- <?php
- session_start();
- ini_set("display_errors","on");
- if($_POST["secret"]!=base64_decode('ZTJLVUxZaVQwWnl+S1Q1bDNKMjgwY1dPXDZJNWpoN3M2TlJIZFl3VG5INTlwbzZhVnozR0cwTEVtMm40STVbdHJLRXFKJHhYMnlsZHcyJXhRaVFublpoRlYwMV0qell5Mkh4cQ==')){ header('location: /'); exit; }
- define('IN_PHPBB', true);
- $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '';
- $phpEx = substr(strrchr(__FILE__, '.'), 1);
- include($phpbb_root_path . 'common.' . $phpEx);
- include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
- include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
- // Start session management
- $user->session_begin();
- $auth->acl($user->data);
- $user->setup('');
- $request->enable_super_globals();
- $username=$_POST['username'];
- $user_password=$_POST['user_password'];
- $user_email=$_POST['user_email'];
- $ip=$_POST['ip'];
- $user_row = array(
- 'username' => $username,
- 'user_password' => phpbb_hash($user_password),
- 'user_email' => $user_email,
- 'group_id' => 2,
- 'user_lang' => 'hu',
- 'user_type' => USER_NORMAL,
- 'user_ip' => $ip,
- 'user_regdate' => time(),
- );
- //register and handle error
- $user_id = user_add($user_row);
- if ($user_id === false){
- //handle error
- }
- ?>
- Aaaaand you are done ;)
Add Comment
Please, Sign In to add comment