-
Posts
14,780 -
Joined
-
Last visited
-
Days Won
43
Everything posted by .josh
-
Right..and it would have its own cron equivalent. Virtually all systems have ability to schedule execution of something on a regular basis...I assure you that's not the issue. Issue seems to be that he's apparently not allowed to, and its probably because he has some super cheap hosting plan
-
Do you consider yourself to be a professional coder? From your own mouth, obviously not php, but what about Lisp, Perl or Ruby? Do you consider yourself to be a professional coder in one of those languages, or some other language? Because you keep trying to blame it on your lack of knowledge of php but from reading your posts here, as well as your blog posts, just seems like it's not really because of lack of php experience specifically, but lack of experience in programming in general. And that is fine. Everybody starts somewhere. But what is not fine is you making judgments about how long things should take or what others should be able to do, when you don't have the experience to make such statements.
-
surely godaddy has a chronjob in its cpanel, thats the way to go I'm sure they do..but he said that they said "we won't have authority to create a task". ...which means he's probably on a really cheap hosting plan. Most really cheap hosting plans do not let you do things like that.
-
I don't know the exact context but if you are trying to extract something then you shouldn't be using preg_replace(). You should be using either preg_match() or preg_match_all(). I mean sure, you can technically get what you do want by using preg_replace() to remove everything you don't want, but that's kind of an ass-backwards way of doing it. And that's not preg_xxx specific nor is it php specific...that's a way of thinking in general, so you can't really blame your lack of php skills on that. And I have said, it's not very wise to make assumptions about something when you admit you don't know the language. As mentioned, regex is pretty advanced even for people who are otherwise proficient at php - or any other language for that matter. To a degree, I understand this, but if you are already proficient in other programming language(s), then it's not so much of a learning curve to pick up a new language as it is to start programming in general. 99% of it is simply syntax differences and formats, which are trivial, not the same as learning programming concepts in general. Especially when it comes to php, as it is actually one of the lowest learning-curve languages out there. What little you have mentioned, to me not only speaks of being a newbie in php, but of programming in general. Seasoned coders (non-language specific) do not make assumptions about things. They do not just cut and paste snippets of code they googled and use it, without understanding what is going on. Are you seriously going to put code you don't understand onto your live site? I'm not trying to pick a fight or nothin', but seriously, you are giving off the impression that it should be easy, but then trying to excuse yourself from your own judgments. Perhaps this is not what you are meaning to do, but it is what it is, and that's the impression you're giving people.
-
Those functions are pretty straight forward if you already know regex as you claim, or string manipulation techniques in general. And the php manual is widely recognized as one of the most well written manuals..ever. I think you foolishly made a lot of assumptions about how easy something should be, and are now trying to use your lack of php knowledge as an excuse. And that may be a true statement on your part...but that same lack of knowlege applies to accurately judging time and difficulty. It sounds to me like you need a helping of humble pie. To be fair though, regex is not for the faint of heart. Very few people grasp it. Even fewer master it, even the devs who master practically everything else. You are of course welcome to post questions on the forum...if you leave the "I'm awesome, this is easy, everybody sucks, its everybody else and the language and everything else that fails" attitude at the door.
-
Including a file of root directory from subdomain
.josh replied to pracasify's topic in PHP Coding Help
can you please step back for a moment, clear your mind, pretend that you are someone else who doesn't know you or your situation, read what you just wrote, and try to determine if you could possibly solve this problem with the information you just gave? "I clicked buttons and it gave me a subdomain name" tells me...what? -
Including a file of root directory from subdomain
.josh replied to pracasify's topic in PHP Coding Help
what did you do to setup sub.domain.com? What is your virtualhost info? -
Including a file of root directory from subdomain
.josh replied to pracasify's topic in PHP Coding Help
So are you saying you can go to www.domain.com/config.php and that works? -
perhaps you are also outputting a charset meta tag on your page (or a setting in your browser) that's causing your browser to render it as a special char?
-
fair enough...wasn't accusing you of not considering those things, just merely bringing them up as possibilities, since you were pretty vague about your beefs.
-
Not to be confused with Chromulent: a plugin for Google's browser. Edit: I totally submitted that to urbandictionary.com don't be jealous
-
Lack of education does not a smarty make.
-
Hmm..."days to complete". Let's just say for argument's sake that 2-4 hours is an accurate estimate of how long the project should physically take. Are you sure you aren't misunderstanding others' statements of "days to complete"? Perhaps they mean it like "I will have it ready for you in a couple of days". Which is not the same as saying "I am going to bill you 48-72 hours" or whatever. Because...just because something only takes a couple of hours to physically do (allegedly..again, for the sake of argument we're assuming 2-4 hours is accurate), doesn't mean people are just sitting on their ass with nothing better to do than jump on your project immediately and focus solely on that. At any given point in time, I have at least a dozen or so projects on my plate. Just because something takes X time to do, doesn't mean you're gonna get it in X hours. Same with you...you yourself say that you can bust it out in 2-4 hours...but how long have you been sittin' on it? edit: Also, dunno about you, but where I work, we charge for more than just how long it takes to physically code. We include in our SoWs time for communication and figuring out all the details of what you actually wanna do, working with the client devs to make it go from concept to reality (knowing how to interact with a db is not the same as knowing how you have your stuff setup, what established protocols/procedures/coding conventions and other hoops you have to jump through to interact with your setup, etc..), QA processes, etc... IOW there is a lot more work involved in getting something from your head to live on your site than the actual coding. edit: And of course, none of this speaks at all towards their ability to perform the task in general. I am merely pointing out a possible misunderstanding between "how long should this take (how many hours will I be billed)" vs. "when will I actually get it", and also the fact that projects involve more time and work than just coding - something many people tend to forget, when looking for someone to do work.
-
hmm...what about the green part below? Does that count as a match too? Or is that all part of the same block of code and that black bolded part is all you want to match? my thought is to use the red stuff below as delimiters, but that would also match the green stuff, but I don't know if that is a separate entry you're trying to match or not So here's the thing...you say you want to match the text up until the date...but you don't say what the starting point is, and you seem to only have highlighted one bit of text, even though there are several places where your "match text up until date" is applicable. I guess what I'm getting at is that you need a clear boundary (delimiter) for what you're trying to match, and there are lots of dates in this chunk of text you posted (in different formats, I might add..), so as of right now, I'm not seeing a clear boundary. Also...another question...are you sure this is really what the real content you are trying to match looks like? No html code in there somewhere?
-
Instead of trying to match for everything except the date, how about matching just the date and then remove it, using preg_replace ? Or perhaps I misunderstand your overall goal here...perhaps it would help if you should an actual example...
-
2nd preg_match_all doesnt have any data to search from (Curl used)
.josh replied to Nuv's topic in Regex Help
First off, preg_match_all() does not alter the subject in any way, so $continue is not "becoming empty" as you put it. 2nd, we cannot even begin to help without knowing what the value of $continue is, and what you are expecting to get out of it. -
I enjoy watching the yellow angry cephalopods. And Maq exposes himself as a hentai fan. But more importantly, he exposed himself.
-
I'd rather watch Ice Hockey. For some reason, watching women slam balls around as hard as they can makes me cringe. I've watched some matches...I can see it in some of their eyes...I know wtf they are thinking.
-
Yeah... as a heterosexual male, I prefer not to be fingered.
-
Excellent question! hmm tough choice... do the gloves have cut-off fingers?
-
Oye, here's another tl;dr, brought to you by CV... Summary People are grossly mis-informed about cookies and being tracked and their privacy in general. Some people out there are making a mountain out of a molehill about privacy issues, and in the end, the only people who are gonna get hurt by it are the same people they are supposedly trying to "protect" : the end users. What tracking tools do not do First, let me clear up the air here. All of the major tracking tools anybody cares about (GA, YWA, WebTrends, Omniture, etc..) have their own rules about privacy already in place. Some will track more than others, but none of them officially sanction personally identifiable information. So what constitutes "personally identifiable information"? Let me use Google Analytics (GA) as an example, since it is the one most people know about and are probably most concerned about, and because unlike some of the other tracking tools, GA is part of Google, and Google extends much farther than just website tracking GA ToS states that you cannot send any data to GA that personally identifies a visitor. This means no IP address, no email address, no phone number, physical address, real name, etc... In addition to that, they take it a step further and say that you are not allowed to even send data to GA that can link GA to personally identifiable information in your own DB. For example, if you have a db table on your own server that stores personal information (stuff mentioned above) and then a unique user id associated with it, you cannot send that id to GA. Okay fine, but there is no official law, no way to enforce something like that "Fine and dandy, but no official laws mean they don't have to do it, therefore someone out there will not." Fair enough. But I want to point out that in my experience, there is a certain amount of self-policing that goes on with clients and the tracking tool companies. Two words: "Competitive Intelligence." In most cases, all of the coding as far as getting data from point A to point B is done virtually 100% client-side. That means that data is exposed to whoever wants to grab it. The bottom line is that nobody wants to broadcast your personally identifiable info because it gives their competitors a chance to grab that info and steal their (potential) business. So companies have a vested interest in not sending your personal info to tracking tools like GA. But I see stuff in ads that I've previously searched for! Okay first off, let's clarify something here: When you are fapping to midget pr0n on some smut site and then later on see an ad inviting you to ride 3 foot cowboys hung like horses..that is not personally identifiable information. Having said that, when you do see something like that...let's clarify another thing here: some of that is not because of these open-to-the-public tracking tools. In-House-Advertising There is a lot of "in-house" tracking going on. If for instance you go to amazon.com and register and buy something, and then go back again later to shop around, amazon.com will indeed show you targeted advertisements, even if you aren't officially logged back in yet. But this is based on their own cookies, drawing from their own database, etc... This has nothing to do with tracking tools like GA. Slapping lots of stupid rules on tracking tools like GA will do nothing to stop this kind of targeted advertising. In fact, there is currently no way to legally create laws to keep companies from keeping a record of your previous transactions, because there are already laws in place (mostly tax laws) that require them to keep those records. Now...making laws that tell companies whether or not they can leverage their own data to further advertise to you is another story. But I somehow doubt anybody is going to ever make a law that prohibits websites from doing something like that. It is your choice to register and by from xyz.com. It is your choice to go back there. It's as if I were to invite you over to my house and you ask for some tea and then you come over the next day, and me not being allowed to offer you any tea, based on my previous knowledge of you liking tea. It's your choice to come over to my house in the first place. And how would you even go about proving that I'm not just offering you tea because that's all I have, vs. specifically offering you tea because of past history? Sure, with websites its a bit different...you can look at their code and see the algorithms..but do you really think anybody will ever pass a law expecting websites to expose their proprietary code like that? Cross-site-advertising freelance84 wrote, and Maq responded: Something like that would be a huge security & privacy issue. This is in essence what most people are really bitching about, when they talk about privacy concerns (when they are not busy thinking companies are sending their CC#'s to GA, that is). Google has a complex system involving 1st and 3rd party cookies and affiliate systems and tools (GA, Adsense, their main search engine, etc...) and lots of server-side code and databases etc, that tie all of them together. This complex system Google has setup is basically the environment where that "super super global variable" you are speaking of would live. Why? If it helps, think of it in terms of trying to best describe the "root" of the internet. What would you describe as the "root" of the internet (from an average end-user PoV)? In theory, there is no "root" to speak of. In practice however, it's the search engines - they are the lowest common denominators of the internet. So in practice, this is where a "super super global variable" would live. And this complex system of tools and cookies is that "super super global variable" you speak of. And google isn't the only company out there doing this; Yahoo does it too, and so does Microsoft. But very few companies actually do this, because very few companies have all these systems that lots of people use and sites register with, etc... so when we are talking about a battle over "privacy," it's really only against a handful of companies, because there are only a handful of companies out there big enough and have the resources and tools to do this sort of thing. Not even companies/tools like WebTrends, Omniture or Piwik can be put in this bucket, because site tracking tools are just one piece of the puzzle. But back to the point: what do you see in those ads? Do you see your name popping up? Do you see your phone number or address? No! You for example go to site A and search for computer books and then go to site B and then see ads related to books or computer books - non-personal information. And yet, people are bitching about this. Granted, a lot of it is unfounded fears of people thinking more than just that is being tracked, as well as fears that if more that is tracked in the future, there's currently no law to prevent it, but people are still lumping it all into one top level category of "zomg privacy breach." Which brings me too... Tracking non-personal information Why the are people complaining about this? All day long people bitch and moan about how it's hard to find stuff online. You wanna buy a new phone and you spend forever trying to find what you are looking for because of horrible UX issues. This is ultimately what these tracking tools are for: improving UX. Before the internet came along, it was really easy to buy something. For most people, your choices included going to whatever stores happened to be in your physical area. Walk into the store, find your item, pick it up, read the label, shake it around, put it into your basket. Maybe hit up another store that sells the same thing first, but at that point in time, it boils down to which store sells it cheaper. This is not how the internet works. More accurately, the internet has a lot more to it than that. When you go online to try and search for or especially buy something, you do not want to spend hours on end trying to find what you want. You do not want to spend forever trying to figure out whether or not it's even the right item. But you can conceivably end up doing just that, because your perception of the "right item" is not based on what you are physically holding in your hands, but in how the site chooses to display information they decide is associated with the item. bestbuy.com can list their computers under lawn furniture if they want. Or show shitty pictures, or leave out half the info you wanna know about, that some other site does list. So how do you know you're comparing apples to apples? There's got to be some common denominator. And yes there usually is, stuff like UPC codes or product IDs and model numbers and shit. But who shops like that? Tech people? In case you haven't noticed, most people aren't tech people. There needs to be some kind of system in place that lets me shop around from site to site for a widget and gives me some kind of clue that I'm comparing apples to apples so that I don't spend all this extra time trying to figure that shit out, and that's more or less the goal of tracking your online activity. It is essence someone out there saying "Hey, I notice you just went to somesite.com and you're searching for xyz, let me help you find it, show you what others are offering." Is that really so bad? We spend all day bitching about making things easier to do online. Easier to search for relevant stuff. Easier to buy relevant stuff. Easier to filter out the bad or half-assed stuff and get the good stuff. But we are individuals, so in order to find stuff relevant to us as individuals, a paper trail must be made and analyzed. You cannot find the next step without first establishing the pattern. So what do companies do with the information collected? An online company is like any other company in that the ultimate goal of the company is to make money. Whether they accomplish this by selling a product or service or being a resource or <insert whatever> is irrelevant to the point. The point is that every site out there is ultimately trying to make money, even the "public" or "non-profit" places. It takes money to run the site, etc.. and whether they get if from selling something or ads or donations...the point is, they need money in order to run, and the goal is always to make more money, because that's the fertilizer that makes companies grow. Therefore they need a system in place to get that money, and also a system in place to see how users go through that system in order to make it more streamlined, efficient, etc.. (UX). All tracking for this stuff falls under 3 general categories: General tracking This is where tracking tools come in, using GA or the like. GA enables companies to see where you are at on the site, how far into the process you get. What if a lot of people aren't purchasing something on their site because one of the steps in the process was poorly designed? With tracking in place, they can setup points of conversion ("events" or "actions") and see where people are dropping off. They can for instance see that "Hey, we have 5 pages in a registration form, and everybody is leaving after the 3rd page...let's go investigate page #3...maybe there's a coding issue, maybe instructions on that page are unclear, maybe they don't like that posted disclaimer about them selling their soul to us...". So how do they do that? It boils down to using a uniquely generated ID the same principle as a session id, for sessions. In fact, "visit" and "session" are often used interchangeably. All these tools do is make up a unique session/visit ID and pass that along each request so that they can see things like paths taken on the site. Other information they pass are URLs or designated custom values like "page names" or "site sections". None of this information personally identifies you, and as mentioned, tools like GA already have in place strict rules about what information you can pass to them. UX testing Tracking tools like GA help you see bottlenecks in your site's flow, or what pages people are actually going to on your site, etc.. You identify those bottlenecks and then move on to testing with tools such as Google Website Optimizer (GWO), which is basically a tool that lets you display alternate versions of an image, copy, whole page, etc.. and see which ones ultimately yield more conversions. This is good for you because it helps make your time on their site easier. Web developers generally understand this concept (UX in general), though maybe not so much the details about the tracking/testing stuff. But normal users don't know any of that shit. All they know is they go to xyz.com and can't figure anything out and then they get the vague impression someone is watching them because they are starting to see targeted ads and shit, and then read articles from jackasses making out like companies are trying to track and pass off to everybody their personal information. Behavioral tracking This really falls under the general tracking, but this deserves its own section, because this is the core of what drives cross-domain advertising, and what people are specifically worried about. First off, yes, behavioral tracking does take place. Analysts and Marketing folks are interested in knowing things like how often you visit certain sections or pages of a website, because it helps them better gage how interested and/or serious you are about something. For example, let's say you randomly for the hell of it start looking around for a computer. With no history, there's little incentive or motivation for companies to invest time and effort and money into offering discounts or advertisements or anything at that point in time. But if for instance, it is determined that in the last week you have done a search on "buy computer" (or similar), visited several sites that sell computers, etc.. this means there is a good chance you are seriously considering buying a computer soon, and this gives companies more incentive to try and offer you some kind of discount or special package or something "better" than the other guy, so that you will buy from them instead of that other guy. So here's the secret nobody seems to understand about behavioral tracking and targeted advertising: The more we enable companies to engage in this sort of thing, the less we will see random spam, and the better those discounts will be for us. How is that possible, you ask? Think about it...companies are going to advertise regardless. They can't just sit there and hope people will magically come to their store, especially on the internet. The only way they can get people in the door is by going out there and telling people there is a door to go to. Incidentally, if you are a website owner hoping to make money from banner ads, getting like 1/100th of a penny per impression or some stupid shit, lack of behavioral tracking is the core of the reason why you barely make anything. Companies are not willing to pay Google very much to feature their banner ads on other peoples' sites when there is literally almost 0% chance someone will actually click on it, and Google in turn passes that lack of paying on to you. That's why targeted advertising yields you more $$. Google knows there is a higher % chance a user will click on that banner ad if it's something relevant to them, and companies know that if users are being directed to their site because they are actively looking for something, there is a higher chance of them buying it, so they in turn are willing to pay Google more $$ to have their banner ad displayed. It's common sense: I don't care if you're offering me a $1000 computer for $500 (and it's not a scam): if I don't need a computer, I'm not going to go buy it, regardless of how good the deal is. Okay some people will, but that's an issue with compulsive buying. Most of us aren't like that. If we were, random banners ads would yield higher conversions, and you would be getting extra $$ passed on to you from having them on your site. Point is, there is a greater chance of me clicking on a banner ad if I'm actively searching for something, even if there is no specific "discount" or "offer", than just randomly offering me "good deals" when I don't even need the product or service. Or...banner ads showing summer items to a region/country of the world when they are in the middle of their winter season. It makes no sense and wastes everybody's money and guess who gets to make up for that cost in the end: you. And that is the core of what behavioral targeting is all about...looking at trends in activities, finding the patterns and placing bets on the next step in the pattern. This saves everybody time and money and guessing and that makes its way down to us, in the form of being able to find what we are looking for easier, and getting things cheaper in general. But we are too stupid to look at this bigger picture, and are shooting ourselves in the foot. The bottom line Concerns of "privacy" boil down to a whole lot of misunderstanding about what information is actually being tracked, and the motives behind it, and a lot of it is rooted in a fundamental difference in understanding of what "non-personal information" is. We want the internet to be vast and unending, full of limitless possibilities and information and product choices, and yet we also want it to be easy to find the things we want. Well we can't have our cake and eat it too. The internet is too big. There are too many choices, and those choices aren't just about you holding a physical item in your hand, it's you also trying to figure out if you're even comparing apples to apples, where arbitrary people are giving arbitrary descriptions of those apples. And companies recognize that problem as well. They want a standardized, guided way of you getting from point A to point B. They want to make it super easy for you to find what you are looking for, because it means you are spending money, either directly or indirectly. And like all companies, they want you to spend you money on them. Companies aren't interested in broadcasting your personal information to the world, because tracking and broadcasting your personally identifiable information to 3rd parties or the world in general gives their competition a chance to put your money in their pocket. But they do recognize that they have to work together with other companies in order to help you find what you are looking for to begin with, and that is where 3rd parties like Google and tracking non-personal information come into play. And in order to even make all this investment worth it, there has to be things like behavioral tracking, because flipping a coin is no way to run a business. The point is, the more we bitch about our "privacy" (that we really aren't losing), the more we push to make laws that create anonymous surfing the norm, the more we are just hurting ourselves. Do we really prefer massive, untargeted spam or even targeted spam, vs. ads striving to show us deals on stuff we are actively looking for? I for one do not, and this tracking and "privacy" crap is going in the opposite direction.
-
do we need to install mysql & apache server b4 easyphp
.josh replied to sonalee's topic in Third Party Scripts
"Normal eng?" Really? What school are you attending? Government is talking about cutting school funding. Let's vote to have the government take away funding from there...get it closed. They obviously fail. -
$bad_stuff = ("'",'"','%27','SELECT','INSERT','script'); $input = "input from user"; foreach ($bad_stuff as $bad) { if (stripos($input, $bad) !== 0) { // bad item found, do something } }