Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: J1mbo
  • Order by date
  1. J1mbo

    Help with rewrite rule

    Thanks Feherke.
  2. J1mbo

    Help with rewrite rule

    Thanks for the reply. I can't seem to find any good documentation on the use of "!" w/ mod_rewrite, but i thought it was correct from what i've seen in other examples. I'll look into this more closely though. The [^ ] works for negative character classes, but it doesn't work in this situation.
  3. J1mbo

    Help with rewrite rule

    ...to https based on the URI: ### Redirect port 80 to port 443 (ssl) for secure content RewriteCond %{SERVER_PORT} ^80$ RewriteCond %{REQUEST_URI} ^.*(password|phpmyadmin).*$ [NC] RewriteRule ^.*$ https://myhost.com%{REQUEST_URI} [L] I can't get the inverse rule to work, which i want to use to...
  4. J1mbo

    eval a hash variable inside function

    Thanks, but it has to be a variable going into the function since the function will be processing more than just the one user in my example.
  5. J1mbo

    Javascript checking for correct input.

    There is a numeric form validation function in validate.js: http://webcoder.info/downloads/validate.html
  6. J1mbo

    eval a hash variable inside function

    ...(<CONFIG>) { next unless m/^\[([a-zA-Z0-9]+)\]$/; $ShareName = $1; while (<CONFIG>) { next unless m/^\s+comment \= (.*)$/; $ShareDesc = $1; while (<CONFIG>) { next unless m/^\s+valid users \= (.*)$/...
  7. J1mbo

    MAILX - email body not giving &quot;new line&quot;

    Have you tried unix2dos? unix2dos $mail_file | mailx -s "Audit" user@domain.net
  8. J1mbo

    Drop decimal places without rounding

    This one handles whatever number of numbers occur after the decimal: $amtr1 = "3,750.94545645"; $amtr1 = preg_replace('/([\d,]+.\d{2})\d+/', '$1', $amtr1); print "$amtr1";
  9. J1mbo

    Drop decimal places without rounding

    Here's my preg_replace solution: $amtr1 = "3,750.945"; $amtr1 = preg_replace('/([\d,]+.\d{2})\d/', '$1', $amtr1); print "$amtr1";
  10. J1mbo

    Drop decimal places without rounding

    <?php $amtr1 = 3,750.945; $last = $amtr1{strlen($amtr1)-1}; $amtr = rtrim($amtr1, "$last"); print "$amtr"; ?> There's probably a simpler/quicker solution using ereg_replace though.
  11. J1mbo

    jumpstart install getting Link Down - cable problem

    Do you have more than one network interface? What is the output of the 'show-nets' command from the ok prompt? If you have multiple interfaces, try selecting each interface from the show-nets output and then running your boot command again.
  12. J1mbo

    Monitoring an application

    tusc or strace may be what you need. Try googling them for more info.
  13. J1mbo

    How to restrict website access by country

    Thanks for the link. I understand proxies and that hackers exist in the US. I'm trying to eliminate the larger threat and make it not worth their time to bother with me. I can prosecute someone in the US much easier than say Russia or Turkey too. Cheers,
  14. J1mbo

    Date comparison function

    This isn't accomplished very easily with the shell. I researched this issue some time ago and decided to use perl with the date::calc module. Here is a reference i found for a ksh method in my research though: http://www.itworld.com/Comp/2378/swol-0299-unix101/pfindex.html Good Luck,
  15. J1mbo

    How to restrict website access by country

    I had a hacker deface my website a few weeks ago. I've since blocked his IP address range from accessing my site. I'm was wondering if anyone has a mapping of IP addresses to countries so i can block everyone outside the US? I've looked around google w/o any luck. Thanks,
  16. J1mbo

    Get Windows Login name from within a CGI

    I assure you it's not for 'malicious activities'. I have a good standing on this forum. My supervisor swears that this could be done and I told him that it probably cannot. I asked the question because i don't program ever to interface with M$ windows and was looking for some clarification...
  17. J1mbo

    Get Windows Login name from within a CGI

    Sorry, That doesn't work for me. I should mention that the script runs on a Unix server with Apache as the webserver. I don't have the LOGNAM variable. So far I'm able to determine the IP and hostname by using Unix utilities. I may need to pose this question in another forum to see if there...
  18. J1mbo

    Get Windows Login name from within a CGI

    Ok, i'm new to programming in perl to interface with windows systems. All of my experience is with Unix systems. Here is my question: Is there a module or method that can determine what the Windows login name is for a person who visits a webpage? I'm trying to create a login page that...
  19. J1mbo

    can't write to file when it's read into script as a variable

    It seems the while statement didn't paste well into my post. I do have it that way though. ?? Thanks for the other suggestions, i'll implement them into the code. My main problem is that my $tempfile variable is not working when being read in with the while loop code. The system call...
  20. J1mbo

    can't write to file when it's read into script as a variable

    ...-wT $config_file = "./AUTO.cfg"; print header; open ( CONFIG_FILE, "< $config_file" ) ; while ( ) { chomp; next if ( /^#/ ); if ( /^\s*(\S+)\s*\=\s*(.+)\s*$/ ) { eval( "\$$1 \= \"$2\"" ); $DEBUG && printf( "%-25s = %s\n", $1, $2 ); } } close( CONFIG_FILE )...

Part and Inventory Search

Back
Top