Jump to content

andyhajime

Members
  • Posts

    40
  • Joined

  • Last visited

    Never

Everything posted by andyhajime

  1. Used the print_r() and it returns: #Array ( [0] => 10336 [OCTET_LENGTH(imageraw)] => 10336 ) Database recorded: [bLOB - 10.1 KiB] So complete formula would be: $LENGTH = mysql_query("SELECT OCTET_LENGTH(blobdata) FROM thedatabase WHERE id = 'selected_id'"); $FOUND = mysql_fetch_array($LENGTH); $RESULTS = $FOUND['0'] / 1024; echo round($RESULTS, 1).'KiB'; // Results: 10.1KiB Thanks Pikachu2000 & PFMaBiSmAd! AWESOME! I'm so going to write down this snippet so people can use it. There's barely any tutorial online!
  2. I tried this, still not working. Sorry, my php knowledge is very limited in this. $LENGTH = mysql_query("SELECT OCTET_LENGTH(blobdata) FROM thedatabase WHERE id = 'selected_id'"); $FOUND = mysql_fetch_array($LENGTH); echo $FOUND;
  3. I've told the client and the webhoster about the problem they might facing, they gave me the green light, and they wanted this method... as long as there's black and white stating I'm not going to be responsible, fine by me. anyone know how to get blob size? please help dearly me.
  4. Try saving the image name as a timestamp. eg: 200110112312 / YYYYMMDDHHMM. Unless you can use CRONJOB, suggest maybe each time a person visited the captcha page, do the clean up as well.
  5. <?PHP $FIND = mysql_query("SELECT * FROM imagedata WHERE imagecode = '$DO' && imagemodel = '$WHAT'") or die(mysql_error()); $FOUND = mysql_fetch_array($FIND); header("Content-type: image/".$FOUND['imagemime']); echo $FOUND['imageraw']; ?> This is mine and it's working nicely. Try use the example.
  6. The images stored are less then 10kb. Hardly 'stress' mysql. The guy attending the sever said it's so far so good. That's why I need this to work. So I can control the store data. you know how to make it work?
  7. Hey there, need some help badly. I'm trying to get the size of the BLOB data in mysql. Did a search and there are like no tutorial on this. Only relevant info was from this page, at the far bottom, it just wrote this (below code). But the writer did not explain how to use it. SELECT OCTET_LENGTH(content) FROM BloBTest WHERE filename='myimage.png' I just give it a trial an error, wrote this, but did not work. $LENGTH = mysql_query("SELECT OCTET_LENGTH(blobdata) FROM thedatabase WHERE id = 'selected_id'"); echo $LENGTH; Please help....
  8. Thanks Papaface, code works lovely.
  9. Hello all, I'm currently doing this Facebook connect module for my website. With the FBconnect, it creates a user profile on my mysql, which stores only the Facebook userid, the full name, and the thumbnail url of this user. Currently the code works well except for this 'image url checking'. this is my fb profile image url: http://profile.ak.fbcdn.net/hprofile-ak-snc4/hs349.snc4/41540_772137439_5612219_q.jpg when I've added a 'XXX' at the back ( http://profile.ak.fbcdn.net/hprofile-ak-snc4/hs349.snc4/41540_772137439_5612219_qXXX.jpg ). It returns a blank instead. On Facebook, some accounts are not genuine and they might the deleted sooner or later. So I'm trying to figure out a php script or functions which detect if the image is not the 'XXX' version. I've tried using getimagesize() or file_get_contents() but still won't work. any ideas?
×
×
  • Create New...

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.