thesnarkie Posted October 12, 2009 Report Share Posted October 12, 2009 (edited) I would suggest you do a loop in PHP to put together the argument list automatically at run-time rather than hard-coding it manually, that way you'll never miss any values even if facebook changes what they send. Viņš bija domājis salikt kopā visas $_REQUEST vērtības.Kā to izdarīt pareizāk? Pagaidām hārd korā darīju šādi: if($result!=1) { $fb_sig_in_iframe = $_REQUEST['fb_sig_in_iframe']; $fb_sig_iframe_key = $_REQUEST['fb_sig_iframe_key']; $fb_sig_locale = $_REQUEST['fb_sig_locale']; $fb_sig_in_new_facebook = $_REQUEST['fb_sig_in_new_facebook']; $fb_sig_added = $_REQUEST['fb_sig_added']; $fb_sig_profile_update_time = $_REQUEST['fb_sig_profile_update_time']; $fb_sig_user = $_REQUEST['fb_sig_user']; $fb_sig_session_key = $_REQUEST['fb_sig_session_key']; $fb_sig_ss = $_REQUEST['fb_sig_ss']; $fb_sig_ext_perms = $_REQUEST['fb_sig_ext_perms']; $fb_sig_api_key = $_REQUEST['fb_sig_api_key']; $fb_sig_app_id = $_REQUEST['fb_sig_app_id']; $fb_sig = $_REQUEST['fb_sig']; $fb_sig_time = $_REQUEST['fb_sig_time']; ) Edited October 12, 2009 by thesnarkie Quote Link to comment Share on other sites More sharing options...
bubu Posted October 12, 2009 Report Share Posted October 12, 2009 Kur salikt? Mainīgajos? Droši tas nebūs, bet var rakstīt extract($_REQUEST); Quote Link to comment Share on other sites More sharing options...
thesnarkie Posted October 12, 2009 Author Report Share Posted October 12, 2009 header("location:fb_signup.php?fb_sig_in_iframe=$fb_sig_in_iframe&fb_sig_iframe_key=$fb_sig_iframe_key&fb_sig_locale=$fb_sig_locale&fb_sig_in_new_facebook=$fb_sig_in_new_facebook&fb_sig_added=$fb_sig_added&fb_sig_profile_update_time=$fb_sig_profile_update_time&fb_sig_user=$fb_sig_user&fb_sig_session_key=$fb_sig_session_key&fb_sig_ss=$fb_sig_ss&fb_sig_ext_perms=$fb_sig_ext_perms&fb_sig_api_key=$fb_sig_api_key&fb_sig_app_id=$fb_sig_app_id&fb_sig=$fb_sig"); Visas tās vērtības saiet tur iekšā. : D Un vajadzētu lai viņš iegūst visas vērtības no request un ieliek tur. Quote Link to comment Share on other sites More sharing options...
briedis Posted October 12, 2009 Report Share Posted October 12, 2009 (edited) foreach($_REQUEST as $key=>$value){ $str .= $key . "=" . urlencode($value) . "&"; } $url = "fignja.php?" . $str; Uz fikso es šitā darītu :) tik varētu vēl beigās novākt to & Edited October 12, 2009 by briedis Quote Link to comment Share on other sites More sharing options...
marcis Posted October 12, 2009 Report Share Posted October 12, 2009 Es savukārt uzbūvētu pieprasījumu ar http_build_query() palīdzību Quote Link to comment Share on other sites More sharing options...
briedis Posted October 12, 2009 Report Share Posted October 12, 2009 Es savukārt uzbūvētu pieprasījumu ar http_build_query() palīdzību Labs, nezināju par tādas f-jas eksistenci :) paldies, noderēs! Quote Link to comment Share on other sites More sharing options...
thesnarkie Posted October 14, 2009 Author Report Share Posted October 14, 2009 Apgāju šo problēmu ar citu risinājumu, bet paldies par f-ju mārci! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.