Guest User

Untitled

a guest
Jul 29th, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. Website side:
  2. $dB->query("INSERT INTO Me_MuOnline.dbo.forum_tmp (forum_fid,forum_nick) VALUES ('".$_SESSION['username']."','".$userid."')");
  3. extract($_POST);
  4.  
  5.  
  6. if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
  7. $_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"];
  8. }
  9.  
  10. $ch = curl_init();
  11. curl_setopt($ch, CURLOPT_URL,"http://forumurl/process.php");
  12. curl_setopt($ch, CURLOPT_POST, 1);
  13. $titkoskod='e2KULYiT0Zy~KT5l3J280cWO\6I5jh7s6NRHdYwTnH59po6aVz3GG0LEm2n4I5[trKEqJ$xX2yldw2%xQiQnnZhFV01]*zYy2Hxq';
  14. curl_setopt($ch, CURLOPT_POSTFIELDS,"username={$userid}&user_password={$memb__pwd}&user_email={$mail_addr}&ip={$_SERVER['REMOTE_ADDR']}&titkoskod={$secret}");
  15. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  16. $server_output = curl_exec ($ch);
  17. curl_close ($ch);
  18.  
  19. header('Location: https://forumurl/');
  20. exit();
  21. Process.php:
  22.  
  23. <?php
  24. session_start();
  25. ini_set("display_errors","on");
  26. if($_POST["secret"]!=base64_decode('ZTJLVUxZaVQwWnl+S1Q1bDNKMjgwY1dPXDZJNWpoN3M2TlJIZFl3VG5INTlwbzZhVnozR0cwTEVtMm40STVbdHJLRXFKJHhYMnlsZHcyJXhRaVFublpoRlYwMV0qell5Mkh4cQ==')){ header('location: /'); exit; }
  27. define('IN_PHPBB', true);
  28. $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '';
  29.  
  30. $phpEx = substr(strrchr(__FILE__, '.'), 1);
  31. include($phpbb_root_path . 'common.' . $phpEx);
  32. include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
  33. include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
  34.  
  35. // Start session management
  36. $user->session_begin();
  37. $auth->acl($user->data);
  38. $user->setup('');
  39. $request->enable_super_globals();
  40. $username=$_POST['username'];
  41. $user_password=$_POST['user_password'];
  42. $user_email=$_POST['user_email'];
  43. $ip=$_POST['ip'];
  44.  
  45.  
  46. $user_row = array(
  47. 'username' => $username,
  48. 'user_password' => phpbb_hash($user_password),
  49. 'user_email' => $user_email,
  50. 'group_id' => 2,
  51. 'user_lang' => 'hu',
  52. 'user_type' => USER_NORMAL,
  53. 'user_ip' => $ip,
  54. 'user_regdate' => time(),
  55. );
  56.  
  57. //register and handle error
  58. $user_id = user_add($user_row);
  59. if ($user_id === false){
  60. //handle error
  61. }
  62. ?>
  63.  
  64.  
  65. Aaaaand you are done ;)
Add Comment
Please, Sign In to add comment