Jump to content

End User

  • Content Count

  • Joined

  • Last visited

Everything posted by End User

  1. > How did you get into Web Development?My parole officer suggested it as part of my work release program. And by "suggested", I mean "in lieu of sentencing".
  2. Unless I misunderstand the question, all you need to do is wrap the path data in an image tag as you loop through the rows:while($row = mysql_fetch_array($result)){ print "$row['name']<br /> <img src=\"$row['cover']\"><br />";}
  3. That's a pretty broad statement. If you're accepting user input, exactly how are you sanitizing it? That would be my guess at this point, if the input data is truly being sanitized properly. Might want to run a rootkit hunter on the box and see what turns up.
  4. Probably the easiest way is to create an array, shuffle it, and use array_pop() to get a random number. Then you can either:- re-shuffle the array and use array_pop() again, or- just keep using array_pop() to pull off the already-shuffled numbers: $arrNums = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);shuffle($arrNums);$random_number = array_pop($arrNums);$random_number = array_pop($arrNums);$random_number = array_pop($arrNums);
  5. For some people, page impressions = revenue.
  6. You looked through all 497 results and found nothing? In that case you might be better off using the forum on the FPDF site to ask this question: http://fpdf.org/ (click the "Forum" link)
  7. I found it here: justify text in fpdf
  8. Probably because "mysql_fetch_array()" would seem to imply that what's returned is an array.
  9. If they're in your account, change your password. No other recourse except changing your email address.It's also very possible that you're the victim of a "Joe Job", and if that's the case there's not much you can do about it. A joe job is when a spammer uses your email address as their return or "From" address. This is fairly common and there's no way to prevent it. I have one or two domains that get floods of Joe Job emails periodically, sometimes several thousand in a day. There's no real defense against this, as there isn't any way to stop someone from using your address as their "From" ad
  10. Too easy, where's the challenge?
  11. I'd swear I've seen this done before but can't find any clear examples...Is there a way to get two counts from one query? For example, can I get a count of all rows in a table that belong to a given user_id, and at the same time get a count of all of those items that also have some other specific column value (like, "full member" or "banned" or whatever)?Never mind- solved: SELECT (SELECT COUNT(*) FROM tableWHERE u_id= '1' ) AS total_ids, (SELECT COUNT(*) FROM tableWHERE u_level = 3) AS total_level
  12. More explicitly:Open the file and read it in: $filename = "/path/to/file.txt";$handle = fopen($filename, "r+");$contents = fread($handle, filesize($filename));fclose($handle); ...edit the file...Write the file back out: $string = 'my new data';$filename = "/path/to/file.txt";$handle = fopen($filename, "r+"); // could also be "$handle = fopen($filename, "w");"fwrite($handle, $string);fclose($fp);
  13. Open the file with 'r+'. Read the file in, edit the text, then write it back out:$fh = fopen("/path/to/file.txt", "r+");
  14. End User

    php quiz

    Google is your friend: PHP Quiz Scripts
  15. End User

    RegExp Help

    For what it's worth, I highly recommend Regex Coach, a free regex testing program: http://www.weitz.de/regex-coach/It'll save you tons of time when puzzling out regex stuff.
  16. You're better off getting an already populated DB table with the IP and country values. MaxMind.com has a free one I think (may not be updated very often). There also lots of other places to get IP-to-country DBs.
  17. Yup, it's possible via PHP: http://jetscripts.com/geotool/So, it's possible and you can do it. You'll need to get an IP-to-country DB and use code to translate the IPs to the country.
  18. End User


    Just a guess, but it could be that you have to escape the parens passed in that function. As a test, try something like this:<img src="/smilies/sad.gif" onclick="smiley(':\(');" alt="">
  19. Not to shovel too much pessimism or reality into this, but be aware that NDAs are broken all the time. If the company that breaks it has a sufficient supply of money and/or lawyers, nothing will happen to them (except that they'll get rich off your idea). This is an unfortunate fact of life. See Microsoft vs Almost Everyone for examples. It can be difficult to prove and impossible to enforce. Also, companies patent stuff all the time that has plenty of existing "prior art" on the record (which in theory should prevent them from doing so), and many of them get away with it. In fact, most of the
  20. Show us a sample email and maybe we can work up a solution.
  21. One or more of these might be what you're looking for:Automatically make active links to URLs. Works for both 'http:' and 'mailto:' links.http://psoug.org/snippet/PHP-Auto-Link-Maker_20.htmAnd a supposedly more secure version:More secure version of the link conversion codehttp://psoug.org/snippet/Secure-Auto-Link-Maker_21.htmAnd this one, which looks kind of gruesome to me:http://psoug.org/snippet/Auto-Link-Maker-2_130.htm
  22. I could be wrong, but I don't think he was asking for advice on how to become a patent troll, lol.
  23. In my personal opinion, nothing could be further from the truth. Perhaps to some extent, but there are real-world limits that can't be avoided. The problem is this: somebody somewhere has to do the actual work. It reminds me of a quote attributed to Mother Teresa after Princess Di had given her a substantial check to use in her charity work. Supposedly Mother Teresa said later that, "Yes, it's all well and good to donate money, but if you want to dig a ditch, someone has to hold the shovel." In other words, at the end of the day someone has to do the actual "work" part of the work, and handing
  24. I'm curious...other than increased security, I'm wondering what the other benefits or advantages would be to storing the images in the DB.
  • Create New...