Jump to content

tibberous

Members
  • Posts

    1,187
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by tibberous

  1. Does anyone know of a free php library to create pdf417 2d barcodes?
  2. I am trying to go through all of the emails in an inbox with php. I saw a way to do it with imap_open, but I don't have the imap functions installed. Does anyone know of another way to do this? I would think someone would have written a 3rd party library that just uses sockets -- kind of like phpmailer but for receiving instead of sending.
  3. I am running PHP on Centos. Does anyone know how I can get the imap functions to work?
  4. I have a web app that sends out notifications. I set it up to send through Google business, but they have an outbound limit. Does anyone know of a mail service that lets you send an unlimited amount of outbound and actually works good?
  5. I know that it is, just wondering the logic behind why. Guess it tries to convert gallery to a number, and gets 0... made for a damn annoying bug though.
  6. PHP says this is true: if(0 == 'gallery'){ } Why in the fuck does it consider the number 0 to be equal to the word gallery??
  7. Yeah - I know how you'd do it, just was hoping someone already did. Might just write it so that it only does one or two lines, which makes the problem quite a bit easier. Still going to be a couple pages of code.
  8. I am looking for a dynamic image script that handles word wrapping and possible font resizing. Basically, I have a dimensions, a font and a company name. So, lets say I am trying to make a 300x300 image for Bob's Boats in verdana. I want a script that not only creates the image, but tries to use up the available space (putting each word on a line, using a large font, horizontally and vertically aligning everything) Worst case I'll write my own, but the algorithm seems pretty complex. For example, lets say the companies name was: Chocolates in a Basket, it could be: Chocolates in a Basket Or: Chocolates in a Basket But never: Chocolates in a Basket Worst case, I might make it so that it supports 3 lines, but only ever puts the company name on 2 by default, and if the user wants to manually change it, they can. Even that isn't perfect though, because if the dimensions are something like 300x35, you wouldn't want a second line, let alone a 3rd.
  9. Screenshot the refund policy they have on their site. Tell them that if they don't issue a refund, you are doing a chargeback with your credit card company. Do a chargeback - include their refund policy. It doesn't matter if you thought you were a box of rubber dicks mailed to your house - the site says "If you’re not satisfied with our service, we’ll give you your money back."
  10. Just make changes on the live site. Have a backup system so you can restore and files that get screwed up.
  11. Make a table with 2 columns, id and value. Make value a random md5. On the first form, generate a new value and put: <input type='hidden' name='code' value='$value'> When they submit, see if value is in the table - if it is, process the action and delete the value. Sometimes better than session vars, like if the user has the site open in 2 tabs.
  12. I have a Gigabyte GA-870A-UD3 . A couple hard drives got unplugged and now instead of a 4 disk array I have 2. This is MORE risky than not running RAID! I plugged the drives back in, and it sees them, but it won't let me re-add them to the raid array. Even if the information on them is out of sync, I should be able to format over them and add them like a new drive, right?
  13. I am trying to create a file, then give it to the linux user 'templates'. I can create it, chmod it to 777, but can't change the owner from apache. If I do: chown("/home/templates/file.php", "templates"); I get an operation not permitted error. If I do: shell_exec("chown -R templates /home/templates/file.php"); I don't get an error, but it also doesn't work. Guessing this is some kind of stupid security thing - anyway around it? Right now I'm just setting everything to 777 =/
  14. Flash / Auctionscript I know, good with javascript and Photoshop. The other stuff would be cool, IF I could get paid for it. If I can't, then I'm still having to do all the projects I am now, in addition to anything new I pick up. Think my problem might come down to too much computer time in general. Lets say I have a project that should take 30 hours. Rather than sit down, and do it in four days, I: Wait a full month to start it Look back over notes and try to figure out what I'm supposed to be doing Half-ass start it, wait two more weeks Hear from the client, decide I need to finish it over the weekend Work 10 hours Skip a day Work a few hours a day for the next few days, spending crazy amounts of time on forums, hulu, CH, wikipedia. Get a day away from finishing, put in 12 hours and wrap it up. So now it FEELS like I've spent a long time on the project. It feels like I never leave my desk, but it's kind of my own fault -- although if I enjoy the project I'm working on, I really can sit down and code 60 hours in 5 days.
  15. Yeah, little overkill. I got a TV, security camera monitor, main computer and secondary computer - even that's only 4 monitors. I could see how a couple more monitors could be cool though, they'd basically keep you from having to switch between windows.
  16. I think the problem is that the fun, challenging, interesting stuff isn't what makes the money. Even high-dollar projects ($5,000+) seem to be more trouble than there worth - the real money is in these CMS/ecommerce type sites I keep getting, because of how fast they go together - and the only reason they go together so fast is because I've done so many. It makes sense - the more you do something, the faster you get, the more you make. This *should* be a good thing. Problem is, I'm not a code producing robot - I'm a person who's brain doesn't like to be bored or continuously repeat the same task. Oh well, wrapping a project up tonight, might take a little break after.
  17. Anymore, I hate programming. Every project is the same - create an admin area, create a table, create a page that lists all records from a table, create a page to view/edit that record, create activate/delete functions. Then create a design, create pages, paste in slideshows / photo galleries / whatever, and done. It's just so damn cut and dry and so damn repetitive. I'll bet 80% of any project I do is cut and paste. In some ways, it's good. I can do a $2,500 project in a couple days, but it's just the same thing over and over and over again. I might as well be working in a damn assembly line. I dunno - I've been a programmer forever, it just sucks when you realize that what you do isn't actually challenging, it's just a job like everyone else has. The stuff that was challenging you did two years ago, and can just reuse. Maybe it's just the jobs I've been getting, but really there are only a few different components to most websites, and I have almost all of them in a folder on my desktop. Every now and then I'll get to do something fun, like write a datamining spider or Excel importer, but that's like 1% of projects. For anyone that's been programming a while, do you like being a programmer? Do you like programming? I think right now my answers would be 'Yes' and 'No' =/
  18. I have a contact form, and I want to make sure it doesn't send a bunch of duplicates if the page is refreshed after being submitted. Simple way is to make sure this record isn't identical to the one before it: select * from `contacts` where `Name`='$name' and `Phone`='$phone' and `Message`='$message' and `Subject`='$subject' and `Email`='$email' But, that checks against all records. While not likely, this could cause problems, if the same customer came back a month later and put in the same exact contact. Any way I can check it only against the very last record in the database? Something like: and `id`=XX , where XX is one less than the current auto inc id?
  19. Give the shops a unique id, if your not already. Then create a table called items, give items one field called id, that is a unique number, and a second field called owner, that is the id of the shop they belong too. Make a page called items.php, that prints out all the items. Then make it so, if you pass a shop, it only shows the items for that shop. So, items.php?shop=1 would show all the items in 'Two Feet' Charley's Fish Shop. Then, on your shop page, link to items.php?id=X , where X is the id of the shop. I'd worry about the url/shop/shopname thing later, it's a little advanced and you can always add it at the end anyway.
  20. Yeah, no reason it wouldn't work just based off what your explaining. Sure you don't have some old cookie / session data stored on the non-ie browser?
  21. Got it: $dimW = $dim[0]; $dimH = $dim[1]; if( ($w*$dimW) <= ($h*$dimH) ){ $h = ($h / $w) * $dimW; $w = $dimW; } else { $w = ($w / $h) * $dimH; $h = $dimH; } Trick with shit like this is to draw out the problem and know what your final values are going to be.
  22. I want to resize an image to fit within a rectangle. Lets say my rectangle is 400 wide and 200 tall. My image is 300x300. It should take, and make the rectangle 200 tall, then scale the width accordingly. I wrote a function a while back that resizes inside a square, but that was a little easier, since you know to constrain by height if height is greater than width, and to constrain by width if width is greater than height. $w = $stats[0]; $h = $stats[1]; if($dim){ // constrain image if($w > $h){ $h = ($h / $w) * $dim; $w = $dim; } else { $w = ($w / $h) * $dim; $h = $dim; } } Thats my code to constrain inside a box. It gets the starting h and w from $stats, which is loaded from getimagesize. Then it sets a new h and w based on dim, which is the size of the box. The new version will need dimW and dimH, instead of just dim. Can anyone help me out?
×
×
  • 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.