Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. array_multisort
  2. preg_match('~<div id="displayimage">.*?<img src="([^"]*)~is',$html,$matches); If that doesn't work, try: preg_match('~<div[^>]*id\s?=\s?["\']displayimage["\'][^>]*>.*?<img[^>]*src\s?=\s?["\']([^"\']*)~is',$html,$matches); 2nd is not as efficient but gives a bit of breathing room for variation of coding.
  3. umm...the point of being inside public_html vs. outside public_html is that one is accessible to the public and the other is not. If this file is somehow accessible directly even though it is outside of public_html, then the chmod on the folder is set to allow it.
  4. okay but understand where microsoft is coming from. They are a giant. They've been a giant for a long time. Then all of a sudden out of nowhere, a couple little people decide they want a standard for shit, and then start bitching because MS is like who the fuck are you? If anything, people should be conforming to MS's conventions. Or even if they aren't the best, that's not really the point. You can't just go up to a big ass corporation as a handful of nobodies and decide hey you wanna do this thing, now conform or you're a jerk. Don't get me wrong...I do agree with the concept of standards. But I also sympathize with Microsoft on that. At least, back in the day. Like 99.999% of people used IE back in the day. Even today they are still the majority. Why the hell should they have to conform to some standards written by a couple of small nobodies? People should be conforming to them. If I were in Microsoft's shoes, I would have interpreted this whole "let's all go by this standard right here" as people trying to cut into my business. Which I'm sorry, IMO that's all this whole "standards" thing was in the beginning - an attempt to dethrone Microsoft and get a bigger piece of the pie. Time and again I see people failing to look at it from other than a purely a coding perspective. The world does not run on code. You have to consider the politics of the situation. This whole "standards" thing has never been about making life easier for coders. The corporate guys with the cash don't give a shit about making things easier for the coders. They never have and they never will. It has always been about making other people larger players by making Microsoft a smaller player. I have a lot of respect for Microsoft for even giving these other people the time of day, let alone conforming to so called standards. As a developer, yes, I would like to see standardization. It sucks that there is not. But don't be blind. It is not as simple as Microsoft not wanting to conform just because they are stupid or being dicks or <insert whatever>. Put yourself in microsoft's shoes (try to be serious about it too). You're this big ass company and virtually everybody uses your stuff. Other people see how successful you are and want to start up their own business similar to yours. So let's say there's 5 mom and pop shops setup. They have their own system. They are small, etc.. now they get together and decide hey, it would be easier for us all if we all followed the same coding conventions, standards, etc.. yeah, easier for them because they are small. So they put together some documents and give you a buzz and say "hey, we decided there should be standards, here they are, if you don't follow them then you suck and you're not getting with the program." I mean seriously, how would you react to that? You dominate the market, and out of nowhere a couple nobodies are saying you need to change your shit or we'll start telling everybody you suck. You'd be pretty damn pissed and you know it.
  5. Come on, you have to at least admit the web developer tool built-in to IE8 that mimics firebug is a godsend.
  6. I'm going to go out on a limb and assume that since you're actually asking this question, that you have no php experience, and even little to no programming experience in general. I suggest you start with basic "hello world" tutorials. You have to learn to crawl before you can learn to walk.
  7. I have vista 32 on my laptop and vista 64 on my desktop. Other than it constantly asking for permission to do every gd thing, I haven't had any more issue with it than any other windows version. As I have said many times and it is my sig-list, stop illegally downloading music, warez, pron, etc.. and I guarantee 99% of your windows "bugs" will disappear.
  8. assuming that entire row is one string: $row = "33 | Joey | 532.jpg,536.jpg,537.jpg,538.jpg,539.jpg,540.jpg"; $c = explode('|',$row); $images = explode(',',trim($c[2]); // example print_r($images);
  9. echo implode(',',$links_array);
  10. if you're just looking for a generic "are there anchor tags around this?" check: preg_match('~^<a[^>]*>.*?</a>$~i',$value);
  11. Also format and fresh install will seem faster if you don't do regular maintenance, like defrag your hd, get rid of old/unused registry entries, etc...
  12. need to double escape it. \\t
  13. I'd like to hear these long and boring reasons that somehow justify client-side validation over server-side validation.
  14. [php ] stuff here [/php ] without the spaces
  15. and by the way, you might wanna rightclick > viewsource that output of yours. You do know that you are capturing that div and b tag, along with the title, and not just the title itself, right?
  16. well you have your parenthesis wrapped around your whole regex, except for one wildcard thrown in there at the end... you could always remove that dot at the end and the parenthesis, and then element 0 will be like element 1. But in general, element 0 is always the full regex match. This would just coincidentally work for you. But there's nothing wrong with using element 1 in the first place...
  17. I encourage you to make a backup copy, and experiment away. And also use code tags when posting.
  18. element 0 contains the full regex match. element 1 contains the first captured match (what you have in parenthesis). Element 2 would contain the 2nd captured match, etc...
  19. did you set the position of the divs to something other than static when you set the z-index? As Blue said, z-index only works if you also set the position.
  20. Your error tells you you are using an invalid image resource. So look at your image resource. Maybe captcha.png doesn't exist. Maybe you spelled it wrong or forgot the path. It doesn't help that you are suppressing any errors that might show up, putting that @ in front of it.
  21. if the column is auto_increment then it cannot be null. You don't see how those 2 things do not work together?
  22. foreach($array as $value) { preg_match_all(pattern,$value,match); }
  23. \d does not need to be wrapped in brackets because it is itself a shorthand character class. But you don't really want to use it anyways, as \d accepts more than strictly 0-9. Better to explicitly use 0-9. Also your original regex probably wasn't working due to you not anchoring boundaries to it. You kind of fixed it by adding word boundary shorthands to it but that just stops someone from entering in "blah232343..." not "blah 234324..." or "blah@234324..." etc... also you put the 2nd one in the wrong place. The anchors you really want are the start and end of line anchors ^...$ /^[0-9]{15}\.ask$/
  24. you are using a variable for a column name. Does this mean your table has id, ad_id, user_id and then for instance 5 more columns and you are populating one of them depending on your script? If that is what you are doing, your error is probably because you do not have your columns setup with a default value, so sql expects you to provide a value for all of them, not just one of them. Either include the columns and a null/0/whatever in your query string or else in phpmyadmin ( or however you go directly to your database), set up your columns to have a default value.
  25. maybe it's supposed to be a sound one might associate with the proverbial light turning on in their head. "<BING!> I just had a brilliant idea!" or perhaps the sound of the buzzer/bell being hit by the contestant on a game show when they know the answer. game show host: "what is the.." contestant 1: [hits buzzer] <BING!> game show host: "yes contestant 1?"
×
×
  • 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.