Jump to content

Richard_Grant

Members
  • Content count

    71
  • Joined

  • Last visited

Community Reputation

2 Neutral

About Richard_Grant

  • Rank
    Regular Member

Contact Methods

  • Website URL
    http://www.jobnow.today

Profile Information

  • Gender
    Male
  • Location
    Daytona Beach, FL
  • Interests
    Футбол.
  • Age
    20
  1. Richard_Grant

    Bash syntax

    This is a simple permutation function that i was converting from php: string_gen(){ declare -a chars=('a' 'b') max=4 let length=${#chars[@]}-1 n=0 combination=" " for i in `seq 0 $max`; do let n=($n*($length))+($length) done remainder=0 for i in `seq 0 $n`; do current=$i combination=" " while [[ $current > 0 ]] do remainder=($current%$length) echo remainder if [ $remainder -eq 0 ]; then combination="$combination"${chars[$length]} else combination="$combination"${chars[$remainder]} current = $current/$length fi done done echo $combination } What is wrong with the syntax? Link to PHP version: http://stackoverflow.com/questions/12293870/algorithm-to-get-all-possible-string-combinations-from-array-up-to-certain-lengt
  2. Richard_Grant

    Ranting on GoDaddy.

    Tbh iv'e never had any issues with Godaddy at all, i think your just incapable of managing your own website. If you don't like basic webhosting then maybe you should get a VPS. Their job is only to make sure your SERVER is running not your WEBSITE.
  3. Richard_Grant

    Session_Write_close()

    Can someone dumb the function session_write_close() to me? Ive read this http://php.net/manual/en/function.session-write-close.php and i still don't understand!
  4. Richard_Grant

    SQL injection attempts... should I be worried

    Mysql is depreciated you should use mysqli or PDO in PHP.
  5. Richard_Grant

    Is it okay to have password hash in session?

    The answer to this post describes my situation. http://stackoverflow.com/questions/4451398/is-it-safe-to-keep-the-user-password-hash-on-session-php
  6. I have a login system Username and Password. My password is encrypted with bcrypt, if it okay to store that bcrypt in a session as $_SESSION["hash"] To verify that the user is who they say they are? Or do i only need to do $_SESSION["username"]
  7. Richard_Grant

    trailing slash is the DEVIL!

    Works just like i needed!
  8. Richard_Grant

    trailing slash is the DEVIL!

    I got these 2 rewrites: RewriteRule ^user/([0-9]+)/(.*)/(.*)/ ./board/user.php?ID=$1&FIRSTNAME=$2&LASTNAME=$3 [L,NC] RewriteRule ^user/([0-9]+)/(.*)/(.*) ./board/user.php?ID=$1&FIRSTNAME=$2&LASTNAME=$3 [L,NC] And i want to combine them but when i do this: RewriteRule ^user/([0-9]+)/(.*)/(.*)(/|$) ./board/user.php?ID=$1&FIRSTNAME=$2&LASTNAME=$3 [L,NC] It doesnt work.. when i type this in the url https://www.mysite/board/users.php?ID=1&FIRSTNAME=Richard&LASTNAME=Grant/ the variables are retrieved like this: (has trailing slash) ID="1" FIRSTNAME="Richard/Grant" LASTNAME="" when i type this in the url https://www.mysite/board/users.php?ID=1&FIRSTNAME=Richard&LASTNAME=Grant the variables are retrieved like this: (doesn't have trailing slash) ID="1" FIRSTNAME="Richard" LASTNAME="Grant"
  9. Richard_Grant

    .htaccess write php string query in url

    Ahhh! i just found out that if i type https://www.mysite.com/user/RichardGrant/1 it doesnt recongnize the url because the trailing slash... but this works fine! https://www.mysite.com/user/RichardGrant/1/
  10. Richard_Grant

    .htaccess write php string query in url

    im using this: RewriteCond %{REQUEST_URI} user/(.*)/(.*)/ RewriteRule user/(.*)/(.*)/ %{DOCUMET_ROOT}/board/profile.php?ID=$1&NAME=$2 Is that fine? its working fine but is it depreciated or anything?
  11. Richard_Grant

    .htaccess write php string query in url

    Thank you im sure that will work exactly the way i need it to, i will let you know as soon as i finish making the user profile!
  12. Okay so i have a URL like this.. https://www.mysite.com/board/profile.php?user=1 I want the URL to be like this.. https://www.mysite.com/user/1 .htaccess rewrites have always confused me.
  13. Richard_Grant

    CookIes!

    oh so i can just put ? setcookie($name, '', NULL, "/", "", 0); Without any compatibility issues?
  14. Richard_Grant

    CookIes!

    This is prob a stupid question.. but i've always wondered.. When deleting a cookie why do we use why do we use: setcookie($name, '', time() - 3600, "/", "", 0); when this works just fine: setcookie($name, '', 0, "/", "", 0); isn't the time() just a waste of space? I ask this because everywhere i look i see: setcookie($name, '', time() -3600 , "/", "", 0);
  15. Richard_Grant

    Protecting from data ciphers

    Because you can force when the user goes to https://www.mysite... to go to http://www.mysite
×

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.