Jump to content


  • Posts

  • Joined

  • Last visited


Posts posted by keldorn

  1. Say you have an image  20091212_81986783.jpg  that is stored locally on your server at,




    You serve these images from static.example.com/uploads/20091212_81986783.jpg


    Would you store the whole url in the database, or just the file name? and in the long term what scales better if you have ever to move the files to many servers and serve them off urls like  static1.example.com and static2.example.com  ?


    If you stored the whole url in the database, if you ever dispersed the files, you would have to update every row in the database where this image is and update it url.


    Storing file name only:

    How the how heck would you know what server its on when it beyond local storage?


    Just something that been thinking about for last few months :?

  2. My machine at work is dual core, 4G ram. The OS leaves allot to be desired.


    That sounds good, but I'm going guess since this is work station at a company, it probably doesn't have a shiny GPU in the pci express slot. So onboard graphics?  Something I didn't mention, was before I built my pc , I bought a HD 3870 with 512 MB vram, and put into my HP compaq (Piece of crap pc with 1 core, with 512 RAM).  The hour glass went away. But still couldn't go buck crazy and open like photoshop, and firefox at the same time.  But there was certainly less hour glass problems.  Right now I have an HD 4670 wit 1GB GDDR2 vram. (My onboard graphics is partly HD 3200 with 216 MB vram, Lol )

  3. There could be any number of variables adding up to get these results.


    Vista is renowned for being a bit of a memory hog, you would likely have had more services / processes running under windows than under Linux.... too many things come into play.


    I've been a Linux user now for probably 6-7 years and find it extremely frustrating in my new job having to use windows. It seems much slower at everything, the filesystem (NTFS) in particular just seem incredibly slow when it comes to reading / writing. I swear I spend half my day watching that freaking hour glass.


    I hated that hourglass, seen it all the time. That was until I put together a decent computer with a Quad core and 4GB of ram. I rarely ever see the hour glass anymore. The only time I see it is when there is something obviously buggy with the application itself, not becuase the cpu/ram is bottlenecked. Tell your employer atleast to put more ram into that computer at work.

  4. Lithium is not exactly a common element. It wont scale when you need to 6 billion people on the planet using it.


    According to the Handbook of Lithium and Natural Calcium, "Lithium is a comparatively rare element, although it is found in many rocks and some brines, but always in very low concentrations. There are a fairly large number of both lithium mineral and brine deposits but only comparatively a few of them are of actual or potential commercial value. Many are very small, others are too low in grade."





  5. That css/javascript hack is actually a serious privacy implication. For example Daniel could lure you to a page on this site, then load that array of sites, then find witch ones you viewed, then send back the server via ajax then store in it the DB, then profile it threw an admin panel and see what dirty pron sites you all are viewing. Then quietly laugh to himself. >:)

  6. There is not point trying to be a designer and being a backend programmer of the site, just go to www.themeforest.net and get a template for $10.

    Well, designing websites isn't hard, but rather getting ideas for it is hard. Coding isn't like that (php)

    I like to do both so I'll just continue to work on both :)

    I hate not knowing every piece of code that is running on my website.


    You probably cannot  be a expert in both areas becuase of time. You have to pick one, focus your attention at that. The more things you try to expert at the more you divide your attention and time, becoming less of an expert at any given area.

    In team projects everyone is an expert at one thing, and it all comes to together, it can be hard being a solo developer and trying to wear all the hats, buying a template is the easiest way to least lay to rest one of those hats. It might take you awhile to realize this, but its true. :)


  7. is there something i can read to help my impliment this? im extreamly new to php, but willing to learn


    I cant say of any tutorials that show to offer secure image upload. I've looked myself before when I was less experienced, but I just figured it out myself. Of all the things, I would say resizing the image and saving a copy of it and discarded the original is the safest, you can even do this without losing any quality in the image, say the image is 500 x 500 Pixels, Jpeg, you can resave it as a 500 x 500 jpeg again, making the image safe. Becuase script kiddies will hide PHP or javascript inside the jpeg, you ever heard of those hacks, not sure how succesfull any attack vector like that would be, but resaving the image would remove any such non-safe data from the image.



    In the meantime while your figure it out,  stop any PHP code from running in upload directory. if your running Apache, put this in your .htaccess for starters,


    php_flag engine off


    There is also this nice class you can plug into your script that will handle the nitty gritty of image manipulations,

    http://asido.info  But requires some OOP knowledge to use. But there are quite a few examples available that come with it, so just look threw it.

  8. Check for just the file .ext is not secure way to handle image uploads.


    This is how I would handle image uploads:


    1. Check for extension  - If fails stop processing, give message of invalid file type.

    2. Check Mime Type  - If fails stop processing, give message of invalid mime type.

    2. Size check it  getimagesize()  -- If fail then stop processing, give message that supposes image was not a image.

    3. Recrop/Resize then save.  -- Last check if fails will throw warning, but you can use @ to suppress it. If it truly is not an image it will fail on trying to resize it.  -- stop processing and give message to gtfo.



  9. Since any kind of identifying information can be spoofed, I wouldn't of thought you could, or at least not with any high degree of success.


    Doesn't the smtp have to do a connection handshake? You can't spoof an IP if a handshake is required.


  10. I'm looking to reject on port 25 on my server all mail that doesn't orginate from United States, since the U.S has CAN-Spam law from the Federal Trade commission , most mail from there is now safe, quite frankly I'm sick of the bullshit emails that are piling up in my inboxes. I just cleared out 42 Thousand emails on my server, looking at the headers of good dozen or so of them, they all come from France, poland, United Kingdom, and some other places. How can this be done? :D

  11. None of those sound appropiate for a web designer.

    Between VB and Java, I would pick none, regardless of my objective.  Java is pretty slow and nobody actually likes to use applications written in it. VB is think is legacy HHL? See the schools got their heads in their asses. They need to get some C#, PHP and cool stuff in those classes.

  12. I'm really impressed with extJS one. I really got to learn this Javascript stuff, since you know all the web applications are moving to the web. Apparently extJS works with Adobe AIR too, whatever the hell that is, but must be cool  since it called air, (slight sarcastic there) Now you can even create dynamically charts with Flash, without even touching any Flash.

    http://www.extjs.com/blog/2008/02/24/tasks2/ (AIR)


    http://www.extjs.com/deploy/dev/examples/chart/charts.html (All flash, but no embeded .swf's!)



    mochaui does a better job IMO.


    Slightly impressed, but the demo(s) is bit lacking, specially when it said the Youtube video was removed.  :P

    (Youtube is completely unreliable to link from it seems)

  13. I found this, thought it was really cool. Check out the examples...


    Only problem is you need to pay $500 for a licence to use if your site's sauce source code is not GNU GPL.


    Looking at the examples kind of reminds me of a post by Codinghorror where he says,

    "any application that can be written in JavaScript, will eventually be written in JavaScript. "


    Maby even Operating systems? haha  :D


  14. Cags you are a fellow guitarist, nice.

    I own a couple of guitars... Calling me a guitarist may be considered a bit of a stretch though. Abit like calling alot of our members 'programmers'. ;)


    Yeah I wonder too.. Even for the title PHP programmer, For the most part becuase I have not seen anyone's projects here. If half you guys here are PHP programmers, where are the great applications that are running? ;)

    Myself I written thousands and thousands of line on PHP, I do it pretty much without looking the manual or any tutorials, I am a PHP programmer, expect soon a new link in my sig for Web app #2.  Now 'programmer' is bit of a stretch for myself. I wont beable to officially call my a true programmer until I can code in some lower level language like ASM or C. :)

  15. Btw this is my traffic since Nov 8 - Today (dec 9) 30 days(picture below), You can understand then what I'm talking about, if I double that and say near 1 million visitors makes me say $1000, imagine what facebook is making, there spending millions but probably making nothing near that on their own ads.  :D


    [attachment deleted by admin]

  16. Nothing so spectacular: http://www.businessweek.com/technology/content/mar2009/tc20090326_604141.htm


    They just want to lease some servers. Okay, a lot of servers. The rest is pure speculation.


    I think the hardware is more expensive then the ads pays, which is the problem with internet right now to provide services like Youtube and Facebook, these sites are actually not profitable I think are just burning VC money. which is not all too surprising, what is surprising for myself I pay $259 a month for my server, but with all the traffic I get Adsense pays me a paltry maby $300. Profit? None at all. Break even at best... Least with adsense, to make any profit, I have to put CPM ads and load the site with Popunders, which will make another $300, OKAY, now I'm making a little money, but I"m also pissing alot people off probably, and making people want to install Adblock further exacerbating the problem.


    Barely anyone clicks on the ads. O I have plans in the future if gets any worse to just get rid of the dedicated and put a blank index.html that says, "Sorry out of business becuase you bastards didn't click on my ads enough" LMAO.



  17. Cool vids Salathe , thanks for linking that.



    Although I have been developing web apps for the last 10 years I truly wouldnt know where to begin with a system and setup like that.


    Scaling sounds scary to me too.

    I think you just have to be not afraid to break things, and experiment.


  • 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.