Jump to content

Rsmiley

Members
  • Posts

    21
  • Joined

  • Last visited

    Never

Everything posted by Rsmiley

  1. Thanks to you telling me to view the source, I found the problem. The server sending the result was including a ton of 'magic JS' with the result causing it to not decode (obviously) Hopefully they will have it fixed soon, they said it would be earlier but who knows with them. Thank you! If something else comes up I'll be sure to ask again
  2. So its my first time dealing with json_decode and I'm finding it rather difficult. It only accepts and decodes the info when its in plain text attached to a variable but refuses to do it from a variable from a query Heres the code $params = array('code' => $_GET['code'], 'redirect_uri' => REDIRECT_URI); $response = $client->getAccessToken(TOKEN_ENDPOINT, 'authorization_code', $params); //parse_str($response['result'], $infob); print '<br /><b>pretty_var($response)</b><br />$response = $client->getAccessToken<br />'; pretty_var($response); ##DOESN'T -> $trying = $response['result']; ##WORKS-> //$trying = '{"error":1,"error_message":"[OAuth error: invalid_request] The authorization code is invalid.","access_token":null}'; $appear = json_decode($trying); print "This is supposed to be,".$appear->{'error_message'}; print '<br /><br /><br /><b>pretty_var($response, $response[\'result\'])</b><br />$response = $client->fetch<br />'; //$fuck = {"error":1,"error_message":"[OAuth error: invalid_request] The authorization code is invalid.","access_token":null}'; //mysql_query("insert into `oauth` (`id`,`ip`,`key`) VALUES('','{$ip}','{$info['access_token']}')") or die('wtf dude: '.mysql_error()); //$client->setAccessToken('fc09147a2b11a9e9d1a0999b356d12e431d19f1f'); $client->setAccessToken($info['access_token']); $response = $client->fetch('http://api.subeta.net/user/user_details'); pretty_var($response, $response['result']); pretty_var($response) $response = $client->getAccessToken array ( 'result' => '{"error":1,"error_message":"[OAuth error: invalid_request] The authorization code is invalid.","access_token":null}', 'code' => 403, 'content_type' => 'text/html', ) I've tried everything I can think of to make it accept it but it refuses, any ideas?
  3. Found the if(!function_exists()) in the tutorials and surrounded 'function log' with it. It worked, so out of curiousity I checked php.net and wouldn't you know. http://php.net/manual/en/function.log.php Renaming the function solved the problem ''
  4. functions.php source -> http://smileybb.com/paste/99 <- [Password: freak] Error: Fatal error: Cannot redeclare log() in /home/smileybb/public_html/style/inc/functions.php on line 62 functions.php is only called one time to check for errors since I tend to write the backend before the frontend. Any chance you guys could give me some help?
  5. Since I can't edit my original post, the title is misleading, I'm sorry.
  6. I'm trying to write a plugin and when trying to see if a user ID is in an approved users table it does not want to cooperate. It doesn't error on any other $wpdb just this one. I'm not sure whats wrong, then again, I'm fairly new to OOP and WP $wpdb->get_row("SELECT * FROM $wpdb->re_approvedusers WHERE user_id=$userid"); Full function code function re_approved_user_verify($userid) { global $user_ID, $wpdb; //$userid = $this->re_secure($userid); $re_check = $wpdb->get_row("SELECT * FROM $wpdb->re_approvedusers WHERE user_id=$userid"); if($re_check == 0 || $re_check == NULL) { $success = 0; } else { $success = 1; } return $success; } Can anyone tell me what the problem is? $userid is obtained via the function if you're wondering. ERROR: Fatal error: Call to a member function get_row() on a non-object in /home/.../wp-content/plugins/re/functions.php on line 64
  7. I am unsure how to do this. I am not really good, at doing this captcha stuff even tho it is slightly basic. I added the simicolon and i tried sending it over in a hidden but it didnt work then again its probably more of my failure <?php $config = mysql_fetch_array(mysql_query(" SELECT * FROM `configs` ")); if($config['captcha'] == 'On') { $a1 = rand(1,3000); $a2 = rand(1,4535); $a3 = $a1+$a2; ?> <tr><td width=35%><b>Enter the equasions answer</b> <br /><?php print "$a1 + $a2 = <b><span style=color:red>$a3</span></b>"; ?> </b></td><td width=81%><input type=captcha name=captcha><input type="hidden" value="<?php print "$a3"; ?>" name="a4"></td></tr> ... if($config['captcha'] == 'On') { if($captcha != $a4) { print "<B><center><font size=5>CAPTCHA INCORRECT!</font></b></center>"; print "</div></div></div>"; include 'side.php'; include 'footer.php'; exit; } } I know it can be cracked easily its just a simple one as i am totally confused as to how to do an image one.
  8. That happened to me as well. I ended up moving everything around Click topic Solved
  9. I still get the CAPTCHA INCORRECT error
  10. I am not the best with doing if($jhskldaf != $kjdsf) so i need some assistance and i would like some help figuring out how to do this... Its probably once again a simple fix im just to incompetent to figure it out... anyway, <tr><td width="25%"><b>Confirm Email:</b></td><td width="81%"><input type="email" name="email2"></td></tr> <?php $a1 = rand(1,3000); $a2 = rand(1,4535); $a3 = $a1+$a2 ?> <tr><td width="35%"><b>Enter the equasions answer</b> <br /><?php print "$a1 + $a2 = <b><span style='color:red'>$a3</span></b>"; ?> </b></td><td width="81%"><input type="captcha" name="captcha"></td></tr> <tr><td width="15%"><b> </b></td><td width="81%"><input type="submit" name="submit" value="Complete Registration"></td></tr> </table></form> </p> <p> <?php $user = $_POST['user']; $pass = $_POST['pass']; $pass2 = $_POST['pass2']; $email = $_POST['email']; $email2 = $_POST['email2']; $captcha = $_POST['captcha']; $pass1 = md5($pass); if(isset($_POST['submit'])) { if (!$user || !$pass || !$pass2 || !$email || !$email2 || !$captcha) { print "You failed to fill in all fields"; print "</div></div></div>"; include 'side.php'; include 'footer.php'; exit; } if($a3 != '$captcha') { print "<B><center><font size=5>CAPTCHA INCORRECT!</font></b></center>"; print "</div></div></div>"; include 'side.php'; include 'footer.php'; exit; } With if($a3 != '$captcha') { I also tried swapping the variables places and did nothing Whether you submit the proper captcha or not it still errors Demo: http://smileybb.com/flds/register.php Any Assistance from the skilled coders of PHPFreaks?
  11. i believe you would be better off using vbulletin.com or vbulletin.org for this to be honest. That is if your licenced
  12. My username is based on my name because my name is Roger Smiley (my email 2 :P) and i took the first letter of my name and my last name and got Rsmiley. and it just seems to stick so i kept it :)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.