User Profile

Collapse

Profile Sidebar

Collapse
JeremyMiller
JeremyMiller
Last Activity: Oct 26 '08, 10:06 PM
Joined: Sep 9 '07
Location: Reno
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • JeremyMiller
    replied to Iframe IE onload problem
    I know this is an old thread, but the first I encountered when searching for an answer, so I thought I'd chime in. To do it, you need to attach the event. I have event attachment wrapped in a function, but this should help:

    Code:
    eventPush(document.getElementById('frame_id'),'load',function () {myFrameOnloadFunction();});
    
    function eventPush(obj, event, handler) {
      if (obj.addEventListener) {
        obj.addEventListener(event,
    ...
    See more | Go to post

    Leave a comment:


  • JeremyMiller
    replied to crypt and decrypt
    in PHP
    Consult an attorney! You do not want to be the next news story about losing credit card information and be sued for millions! In general, you should not store cc numbers on a server and doing so is probably breaking the law as well as your payment processor's TOS.

    Also, hashes by definition are not 2-way, but 1-way functions. Their usefulness comes from that fact. For instance, if you store a password hashed, you'll never know the...
    See more | Go to post

    Leave a comment:


  • Oh, well you're totally confused. Try starting with this code:
    [html]
    <form method="post" action="send_sm s.php">
    <input type="checkbox" name="candidate username[]" value="dude's name"> Dude's Name<br />
    <input type="checkbox" name="candidate username[]" value="dudette' s name"> Dudette's Name<br />
    ... repeat...
    See more | Go to post

    Leave a comment:


  • JeremyMiller
    replied to bubble sort
    in PHP
    There are a number of sorting algorithms. See http://en.wikipedia.org/wiki/Sorting_algorithm for a list of them. Is there a particular one you want implemented. Also, why are you making this harder on yourself?
    See more | Go to post
    Last edited by pbmods; Oct 22 '07, 12:24 PM. Reason: Fixed link.

    Leave a comment:


  • Can you rephrase that so that it's more clear?...
    See more | Go to post

    Leave a comment:


  • You need to find out why they're being flagged as spam. Check the source of the email and see what the spam tool is flagging. They do it on a points system and if you're on too many points, it gets flagged. That said, there are lots of different spam tools and implementations , so don't expect to get through all of them. Having people you email whitelist you is the best route.
    See more | Go to post

    Leave a comment:


  • JeremyMiller
    replied to How to build a proxy for your website?
    in PHP
    Damn it. This forum irritates me - I never get email notifications. I wish they'd fix that. It's my only complaint. Anyway, let me stop whining...

    If url_fopen is off, then you're screwed on doing something on their servers. If they allow you to view other sites, then you can always get your own hosting and create a proxy. Then, they'd have to have a clue that your site is a proxy site for them to block it unless they block all...
    See more | Go to post

    Leave a comment:


  • JeremyMiller
    replied to How to build a proxy for your website?
    in PHP
    Most are. Hackers love Universities. :) Dummies managing dummies who have the ultimate Achilles heel: They think they know everything....
    See more | Go to post

    Leave a comment:


  • JeremyMiller
    replied to Generate a 10 digit unique id every time
    in PHP
    Just had a thought: Why not provide a login and link(s) to download the file? No funky codes for your end user to remember, just username and password....
    See more | Go to post

    Leave a comment:


  • JeremyMiller
    replied to Generate a 10 digit unique id every time
    in PHP
    I never have had any trouble with collisions using sha1 or md5. I've started to use the better hash functions available in PHP 5. Also, binding to the username helps reduce the likelihood of a problem there.

    I like the idea of a random number, though! For my own code, I'll stick with hashes, though. :)
    See more | Go to post
    Last edited by JeremyMiller; Oct 20 '07, 01:53 AM. Reason: incorrect word

    Leave a comment:


  • JeremyMiller
    replied to Generate a 10 digit unique id every time
    in PHP
    I did reply -- creating a one-to-one function over the integers whose inverse was also able to be expressed as a function was more work than I wanted to do. Of course, you could do something simple like y=x^2+3, but that's fairly easy to crack (the inverse for the non-mathematical is y=sqrt(x-3) and is valid as the domain is integers greater than 0. You could then pad the number with leading zeroes. I was looking for a function that's a bit more...
    See more | Go to post

    Leave a comment:


  • JeremyMiller
    replied to How to build a proxy for your website?
    in PHP
    Well, if you get caught helping people to violate the rules of the school, be prepared to accept the consequences.

    In PHP, just have a form field for the target URL. Then, fetch the contents using file_get_conten ts and echo them out. Very easy. You can also use one of the already available proxy web sites out there.
    See more | Go to post

    Leave a comment:


  • I haven't tried multipart mime on my own. I use http://pear.php.net/packages.php?ca tpid=14&catname =Mail and I highly recommend it. Whenever I've tried to build my own email modules, it works on 80% of stuff and then AOL can't see stuff (can you believe there are dopes still paying them?) or Outlook has a problem (as does all Microsoft stuff). Using PEAR though takes care of all of them (that I've experienced, anyway).
    See more | Go to post

    Leave a comment:


  • JeremyMiller
    replied to BR tag doesn't work in php emails
    in PHP
    I think there are issues doing the \n\r in that order. Most of the time systems will use and expect \r\n
    See more | Go to post

    Leave a comment:


  • JeremyMiller
    replied to File upload problem...
    in PHP
    Change this line to indicate your directory:

    [php]
    move_uploaded_f ile($_FILES["file"]["tmp_name"],"../robin1/".$FILES["file"]["name"]);
    [/php]

    Something like

    [php]
    move_uploaded_f ile($_FILES["file"]["tmp_name"],"C:/wamp/www/practices/".$FILES["file"]["name"]);
    [/php]
    ...
    See more | Go to post

    Leave a comment:


  • JeremyMiller
    replied to BR tag doesn't work in php emails
    in PHP
    Sounds like you're sending in text-only mode. To send as HTML, use the HTML example on php.net: http://us2.php.net/manual/en/function.mail.p hp#id3111223
    See more | Go to post

    Leave a comment:


  • JeremyMiller
    replied to Generate a 10 digit unique id every time
    in PHP
    hmmm...Messing around with functions for awhile and testing inverses, I'd probably stick with a straight polynomial whose closed-form inverse is easy to find. The big pain here is that they all be integers :) Much easier if that restriction is removed.

    OK. So that's in the dump, what about using letters too? You could then do the username concatenated with the download id with padding as necessary.
    See more | Go to post

    Leave a comment:


  • JeremyMiller
    replied to bubble sort
    in PHP
    How about this?

    [php]
    <?php
    $numbers = "5 23 4 6 8";
    $number_array = explode(" ",$numbers) ;
    asort($number_a rray);
    echo "Numbers sorted: ".implode(" ",$number_array );
    ?>
    [/php]
    See more | Go to post

    Leave a comment:


  • JeremyMiller
    replied to Generate a 10 digit unique id every time
    in PHP
    If you don't want the number to be easily guessable, but with moderate security, you have 2 choices as far as I can tell:

    1) Run the database id with a secret seed code through a hash function. Problem here is that hashes are usually more than 10 characters.

    2) Run the database id through a function which is one-to-one. Any ole function will work, but if you make it non-linear, then you'll be doing a bit better. If...
    See more | Go to post

    Leave a comment:


  • JeremyMiller
    replied to How to PREG any character?
    in PHP
    Code:
    [^><]+
    means one or more non-< and non-> character.
    See more | Go to post
    Last edited by JeremyMiller; Sep 26 '07, 09:15 AM. Reason: quantity accuracy change

    Leave a comment:

No activity results to display
Show More
Working...