Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. read stickies.
  2. fyi, DOM is a better method.
  3. To directly answer your question, no there is no server-side way to determine what plugins a user has installed in their browser. It is possible to do some detection client-side with javascript, and either pop a hidden field to send to server, submit info via ajax or just output message directly with javascript. However, all these things are easy to get past anyways, and in no way really hinders the points stated by others. In short, you are approaching this issue the wrong way, look into advice already posted (ask for details if you don't understand)
  4. IMO those shouldn't count as the same. OP: Are you sure you want something like "studying" to count for "study"? If so, there's no real easy way around that, other than to allow for false positives (like requinix's example), unless you basically make a lookup table of all tenses/forms of a given word to check for, in addition to the actual word you're looking for. Anyways, here is a non-regex approach that may or may not be faster... (which also allows for false positives) $file = "I went back home to see my family as I was studying in China. By the time I arrived home I was so hungry and the weather was cloudy."; $words = array("see", "reader", "study", "China", "cloudy", "hungry", "answer"); foreach ($words as $word) { $results[$word] = (stripos($file, $word)!==false) ? 'yes' : 'no'; } // print out results print_r($results); output: Array ( [see] => yes [reader] => no [study] => yes [China] => yes [cloudy] => yes [hungry] => yes [answer] => no )
  5. Is tracking people in a secretive way a correct/moral thing to do? (I don't think so) There is no secret about it. We're plainly talking about it, aren't we? Well I am "shocked". Again, why would anybody other than a retard think the internet should be this magical experience where everything is easy to do according to their individual ways of going about things, and get it all for free etc... and not pay a price somewhere along the line? Yes, I am shocked at how many people out there really do expect others to simultaneously be psychic and ignorant about them. Before the age of the internet business's forked out 1000's on advertising in the yellow pages... etc. Having an internet presence as a business is essentially advertising period, so I doubt they would ask for money to access your site. If you really think you were getting your yellow pages for free then you are being ignorant. You paid for it indirectly, I promise you. Companies pay to have their business listed in the yellow pages. They pass that cost on to you by what they charge you for their products/services. Back then, you simply paid for this stuff more directly (or more accurately, you paid for it less indirectly than now). These says with technology being more complex, there's a lot more moving parts, a lot more people involved between you and the business when it comes to things like websites or being online, so there are more opportunities to lower the price of products and services - providing we stop being whiny bitches about being tracked. Also, having an an internet presence as a presence is not just advertising. And btw, there are plenty of sites who ask for money to access their site. Hello, Netflix and the like? favoritpronsite.com? Music/radio sites? "Help" Services? Sure, they have a "free" area where you can browse services offered but they are not 100% free! Oh I get it, you meant random joe local business. You really don't think they aren't somehow paying for that site by passing that cost on to you? There is nothing free about the internet and we, the consumer, ultimately pay for it, whether directly or indirectly. That is how it has always been and always will be, regardless of whether it is the yellow pages or telemarketing calls we hate or websites or tv ads or anything else. Anything that cannot be paid for somewhere indirectly along the lines, will be paid for by the cost of the product itself. I think maybe you misread whatever article you read or left something important out, because at face value this statement is retarded. How else would FB be able to let you enter in contact info in your profile and have you able to edit it later or share with your friends, except for to store it? And anyways, I'm sorry to be the informer of bad news for you, but the "do what you can get away with" mentality is nothing new and nothing specific to FB. That is how the world works. I'm not saying that is right, but that's how it is. Morality is decided by law, which is written by corporations. But we can say that, by looking at history and how sites came to grow and be more accessible in the first place, and by looking at the money made from companies directly trying to sell you something, whether they got the money directly from you or indirectly. And by looking at the companies who have thrived from tracking you. We get to look at their paper trails and see that this does work, and people are happy with the results they get out of it...the problem is that people tend to get all hypocritical and stupid about it when they sit down and think about it. People want this stuff. They want to be able to go to a site and it be designed to easily do xyz. They don't want to have to pay a million different people a fee to even get online etc... and no, nobody should have to give you something for free! Why don't you try running your own business for a while and see how that goes! That's right. We never know do we. If you somehow think you'll sleep better at night knowing that places like FB can't share info with others for some nefarious purpose... if you're going to be all conspiracy theorist about it, I assure you, "the man" doesn't need to ask FaceBook where you live or what your phone number is. Again, people make out like this "privacy" thing is a way bigger deal than it is. They hear that sites are tracking them and for some unknown stupid reason they imagine their cc, ss, id, phone #'s being shared with lots of people everywhere. Or that some shadow agency is getting ready to totally take over your identity and fuck you over. Are there baddies out there trying to do that sort of thing? Sure. But that's why you avoid shady sites to begin with. If you walk down a dark alley, chances of you getting mugged go up. But what's worse is how some people even bitch about random non-personal shit like how many times "a" page was viewed by "people". I mean come on man, sit down and have a serious thought exercise about what exactly is your problem with all this. If you know that people use this stuff to make things more convenient for you, make things more relevant for you... what exactly is the problem? It "feels" wrong. It "seems" wrong. You need to do better than that. Especially when you're playing the "lack of morals in general" card, because as mentioned, those sorts of people...while they may or may not be legit concerns...do not need people like facebook or tracking cookies to fuck you over.
  6. Haha. You all seem to think that I hate companies profiling its customers. No. I just don't like them profiling me after I have left the premises. I'd love to see any one of you accepting having someone walk along behind you with a clipboard making notes about what you do and where you go after you have left a shop. I think after about 5 minutes you would turn around and confront the person. "Someone" does follow you around from store to store. It's call "Mr. Credit Card." Every time you swipe that card, your cc company records that, and they send that shit to all of its partners and affiliates. Even when you walk out of walmart and go somewhere to eat, Walmart will know. And not just credit cards. Even your bank's checkcard or any other "card". It's all really more or less the same thing. "AAh but I pay with cash only!" you say. So that affords you a little bit of anonymity, good job. But how long do you think that will last? Already many places do not accept cash at all. And even still, most people use a card of some kind already, even if cash is accepted. Facebook (or any other site) can't track all of your browsing history. They can only track pages on other sites that have some actual code on it, like facebook api for liking/sharing an article or posting comment, etc... That is the magic code that makes it possible. Without it, facebook cookies are just that - cookies. Cookies can't do anything in and of themselves. And why shouldn't FB be allowed to track this? At this point in time, you should really be bitching at the website you are on, not FB, but even then, it is your choice to go there and that website has a vested interest in trying to track you just the same. All those form fields with "personal information" they have to fill out mean jack shit to them if nobody is filling them out or when they do, they purposefully misinformation them. And yes, lots of companies have a FaceBook page...but do you really go surfing around FB looking for them? How many people do you know do that? Since when did FB replace Google? Nobody does that. And people bitch about those things too! You point at things you know are useless and claim that is enough for them. More trying to have your cake and eat it too. And even still, who are you to say that you should be able to walk into someone else's house and not be tracked or identified? Again I say, the only people with that mindset are thieves, trolls, cheats, scammers, people trying to cheat the system or other people. I'm not trying to bitch at you or single you out personally. My rants are in general. But as for you specifically, responding to your post specifically, I can see that you do acknowledge some costs involved, and acknowledge on some level why you are being tracked, but there are literally a million moving parts here.... it's not just what you are paying your hosting service to keep your website online. Bottom line is that all day long people try to have their cake and eat it too when it comes to being online. People bitch about having to pay a bill to a dozen different companies just to get online in the first place. They bitch about having to give their payment info to any site out there instead of a single trusted location. They bitch about getting bombarded with ads for things they don't want. People bitch when it's hard to fill out a form or read some article because fonts are fucked or some other UX flaw. People bitch when they have to jump through a bunch of hoops to make a post somewhere. People bitch and bitch and bitch and bitchbitchbitch about all this shit, and then bitch some more when companies try to do something about it. Like I said... people want to have their cake and eat it too. We somehow think the internet should be this super awesome experience where everything is magically exactly how we want it to be, no guesswork or baddie anythings, and most importantly, no having to pay for anything. In short, people seem to expect the internet to be heaven. Well it's not. The truth is that nobody is psychic, and nothing is free. People need to be able to identify you in order to do anything. That's how the system works, both in the real world and online. They are going to identify you one way or the other. We need to look at the bigger picture, start realizing that it's a lot of moving parts. No, companies like FaceBook do not directly need to know our activities or interests etc.. . but other companies do, and this is about connecting different investors and stakeholders together so that they can keep from making us have to jump through all those hoops that we bitch about.
  7. Hate to break it to you, but facebook is by far not the first site to continue to track your activities on their site, even after you "log off". The only thing really "concerning" about this is people who use public computers..but then, even that is nothing new. You should never use a public computer to login to really private stuff to begin with (like your bank). But if you do use it for logging into things like facebook (or something else "private" but not as private as logging into your bank website), you should always make sure to delete all cookies and history before you leave the computer. This is not new.. Here's the thing. Companies spend lots of money investing in their website. They pay people like us to design and build their website. It is an investment to get people to buy their product or get people to engage in xyz or give a shit about ads or whatever their goal is, depending on what the product/service is. Then they pay other people to track what visitors are doing on the website. And why do you suppose you are being tracked? It is so they can try and figure out what parts of their site people like and what parts people don't like, and improve their site. Additionally, they want to be able to show you ads or other content relevant to you so that you will be more inclined to engage with them. And usually the deal with targeted ads is because you aren't paying for their service to begin with. Notice how most sites make them go away when you give them money some other way? Is trying to improve your experience and indirectly offset their cost to bring you said experience on their site really such a bad thing? I swear, people make out like there is some evil plot afoot when it comes to being tracked online, just waiting for guys in suits to come knocking on your door after they find out you like blue socks or some shit. Really?? The worst thing that happens is that FaceBook sees you like a particular product and they go out and tell the advertisers that you like productX so the advertisers start offering you stuff about productX. Is that really a bad thing? "Oh nohs, someone offered me a deal on something I might actually be interested in! IT'S THE END OF THE FUCKING WORLD I TELL YOU!!!!" Are people really that into having people try to sell random shit to them they will never want? Is this how we act in the real world? Do we walk into Walmart and start bitching because they have security cameras up? Because I'll let you in on a little secret: physical stores do the same thing. You don't really think those security cameras are there just to track potential thieves do you? Companies look at them to evaluate the paths people take through their store, what products people actually spend time browsing, etc.. and reorganize their store accordingly. But do we complain about this? We are fucking ourselves because we refuse to look past ourselves and why we are being tracked in the first place. We seem to have this idea that the internet should be a place where we can completely and anonymously act however we want to act and do whatever we want to do without being identified in any way whatsoever and not have to account for said actions. Oh and we also seem to think that it should all be free. Why is this? The only people I can see who stand to actually benefit from this scenario are people who want to exploit, troll, cheat, steal, etc.. the system or other people. But as for people who aren't trying to cheat the system or others... why do you think the cost of things like getting online to begin with are going up? Running servers and websites and all the technology used to even get people online is not free and therefore it will never be free to us. Whether we pay a million different people in order to have an online experience, or reduce it to a handful of people or even one person (and then everybody else get their piece of the pie through them) ... which sounds more convenient to you? But all those people can't offer you this "free" experience and get their piece of the pie from someone without your "paper trail". We have to realize that the more we bitch about things like "privacy" and shit, the more we are going to just have to pay for things more directly. Our ISP costs will go up. Sites will either stop having an online presence or they will make you pay to access them. Is this really what we really want? We seriously need to stop bitching when someone takes note of which page we are viewing on their site, and look at the bigger picture. And I really hate having to defend companies like this. Lord knows, they certainly are ripping us off on lots of things as it is. But once again I'm being forced to play devil's advocate because people are being frakking stupid about shit, not realizing they are just fucking themselves over in the long run by bitching about the wrong things. Pick your battles people!
  8. it's because the /-_ part of your negative char class is being interpreted as a range of chars between / and _ you need to either escape the hyphen or put it at the beginning or end of the list.
  9. you will need to use curl instead of file_get_contents, to automate setting cookies and logging into the member area.
  10. If you are just wanting to open up and grab all contents of file in one go then yes, use file_get_contents. But for large files this isn't a good thing to do, as it it puts the entire content of the file into memory. What you would do instead depends on what you are trying to do in general. If you are parsing lines in a file then you would use fread to read and process one line at a time. If you are trying to search or update lines or otherwise use as a flat-file database...consider using a database instead. Or if that's not an option, consider using mysql-lite.
  11. yah, cookie is probably a good way to go. For reading and setting a cookie, you can grab a couple of functions for that here. And then basically on your page(s), you would have something like // if cookie doesn't exist, set cookie and redirect user if (getCookie("cookieNameHere") != "redirected") { // set a cookie named cookieNameHere with a value to look for, to expire in a year. // it doesn't really matter what you name the cookie as long as you don't name it some other cookie name being used on your site(s). // it doesn't really matter what value you set it as, as long as you set it with something and look for that same something later. // how long you set the cookie is up to you, based on your own timelines setCookie("cookieNameHere","redirected",365); // redirect user to new site location.href = "new site url here"; }
  12. are you using a javascript framework on your old site, like jquery, mootools or prototype?
  13. There are other functions that specifically handle parsing URL strings; here is a non-regex approach. I'm not hatin' on regex (I love regex) but you should avoid using regex when possible, because most people aren't that great with regex, and so it makes it that much harder to maintain or expand code. // url to parse $url = "http://search.yahoo.com/search;_ylt=A0WTfYQKqWlO.FYA2CibvZx4?fr=yfp-t-701-s&toggle=1&cop=mss&ei=UTF8&p=keyword"; // list of url params you want to look for. Code below will return value of first one found $param_list = array('p','q','qt'); // parse the URL and get its components $comp = parse_url($url); // get the host $host = $comp['host']; // parse the query string and return an associative array of all query string params parse_str($comp['query'],$params); // attempt to find value of one of the query string params from your list foreach ($param_list as $k) { if (array_key_exists($k,$params)) { // Your regex doesn't show that you care which param was found, // but if that need changes, then $k is the param that was found // assign the value of the found param to $keyword $keyword = $params[$k]; break; } } echo $host; // 'psearch.yahoo.com' echo $keyword; // 'keyword'
  14. pfft...most regex engines do not support variable length lookbehinds, and the few that do are very clunky and slooow at best.
  15. Alternative, using zero-width assertion instead of captured groups: $post = '..'; $post = preg_replace('~\B:\)\B~', '<img src="smile.png" />', $post); echo $post;
  16. perhaps the big.com domain or its mail server has been used or is being used by other emails flagged as spam, so google may have them flagged as going to spam. There is nothing you can really do about that except find a more reputable host to host your stuff on.
  17. And all it takes is one person to spend 2 seconds with a scanner and some software to put it back to text form. And from there it gets distributed just the same. This is why people focus on freely distributing stuff like this, and focus on making money from performing some sort of service. IOW: move away from product and move towards service.
  18. http://www.phpfreaks.com/tutorial/php-add-text-to-image But on a personal note... I suggest you rethink doing this...
  19. there isn't really any kind of standard...perhaps if you post an example of what you are having trouble with, we can help? Also, usually a tech doc will have markup, naming, coding, etc.. conventions of the doc listed somewhere within the doc, sort of how like a map has a legend.
  20. @sasa: sure, checking for presence of characters NOT acceptable is an alternate way to go. However, it looks like you just c/p'd his base pattern, which doesn't match what he actually says he wants to match for. He says hyphens are acceptable, and he did not mention single quotes. @adam84: FYI neither of these addresses a couple of issues that are commonly addressed with. - These regexes do not account for length limits. Most sites want a name to have a minimum amount of characters, or at least limit the maximum. - These regexes do not prevent values like "---------" or " " or "- - - - - -" or ".....---.-- ---" or...you get the picture.
  21. foreach ($array as $k => $v) { if ($k % 2 != 0) unset($array[$k]); }
  22. if (!preg_match("~^[a-z. -]+$~i",$name)) {
  23. This thread is not meant to promote using frameworks instead of using core javascript for everything. That is just silly. Frameworks are not alternative languages, they are tools built on existing languages to make certain things easier. This thread is about using a framework for AJAX specifically.
  24. What this board is for If you have some code you are wanting people to debug, or a website you are working on that you want people to 'beta test,' post the code/link here. The idea of this forum is that you have finished your code, and now you wish for people to test it for weak spots, logic problems, etc.. While you can of course expect feedback from your testers, if you need more help fixing your code, use the Help forums. This forum is for testing and testing feedback ONLY. This is NOT a "rate my script/site" forum. Please go to the critique forum for that. Try to give a good description of what your code is supposed to be doing. We can do little more than find syntax errors if we don't know what it's supposed to be doing. Your topic doesn't show? All new topics are moderated, meaning that they will not show up until a staff member approves it. Read the rules for posting in this forum and follow the directions. Some advice to be cautious Be very careful on what kind of info you post, especially when it comes to posting links to your site. Posts of this nature are often times aliases of "please try to hack my site and tell me if you do, and how, so I can fix it." We cannot and will not be held liable for any kind of damage or loss that results from you posting any of your stuff here (or anywhere else on the site, for that matter). Not everybody out there is honest. Someone out there may read your post, go to your script, find a security hole and exploit it without telling you, all the while giving you the thumbs up. Rules Regarding "Exploit Scanners" Use of exploit scanners can be an effective way to discover exploits on a website, so we have no intention of banning posting scanner results. But these scanners can also return bogus results. Secondly: Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. As of now, posting scanner results is only allowed under the following conditions: 1) You must share the name and how to get the scanner 2) You absolutely MUST explain every item in the result (why is this a risk, not just because the scanner says so) As with all forum rules, ignoring these could lead to moderation action. Ignorance of these rules is not a defense. Thank you for your cooperation.
  25. ...and you are NOT using a framework like jQuery or Prototype, think long and hard to come up with a very good reason why you are not! In all my years of coding, the only valid reason I have ever seen for not using one of these tools, is because someone is trying to learn it the old fashioned way (but not necessarily actually build websites with it). Or...someone is trying to build their own framework. That's it! IMO there has been no other reason worthy enough to warrant not using jQuery or the like! "It will bloat my website, increase page load time, blahblah" is not a good enough reason! These frameworks are compacted and browsers will cache them! So if you post an AJAX question here and your code and/or question does not involve the use of an existing framework like jQuery, then be prepared for you first response to be something along the lines of "Why aren't you using a framework?" Seriously. It is super easy. Way easier than that code you're trying to post. Save yourself the headache. Get jQuery or similar. DO IT.
×
×
  • 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.