Jump to content

KevinM1

Moderators
  • Posts

    5,222
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by KevinM1

  1. How are you sending the GET request? Functionally, GET and POST are very similar - they're just key-value pairs. If you can grab the HWID and stuff it in a pair for a GET request, you can definitely do the same for POST. In terms of actually sending the requests, that's a bit out of bounds on a PHP forum, but like I wrote earlier, look at the System.Net.Http namespace and the HttpRequestMessage class (MSDN is your friend: http://msdn.microsoft.com/en-us/library/system.net.http.httprequestmessage.aspx -- if that doesn't match your version of .NET, search for what will match your version). You likely don't need your hidden browser, either, as a browser is not required to send HTTP requests. Look at cURL as an example. You can just have whatever UI you're using tell your underlying process to send a HTTP request to the other script, then display the results. Even better, you can do it in a RESTful way, meaning only using GET to retrieve information, and using POST to create/update/send data (like a user login). EDIT: And yeah, your college teacher sounds like he didn't know what he was doing. .NET has never not been able to send POST requests. Web forms/ASP wouldn't work without it.
  2. Like trq said, and in doing web-based .NET work myself, .NET is definitely capable of sending a POST request. Indeed, that's how both ASP.NET and ASP.NET MVC work. There's absolutely no reason why you can't use the System.Net.Http namespace and send a HttpRequestMessage to your other script. Really, you should probably be using ASP.NET MVC from the start if it's supposed to be web-based.
  3. Dumb question: Do you need to send the data via GET? Something like what you describe just screams POST to me.
  4. My SQL sucks, but why would you leave a value as null in the db? Why not simply give it some value by default (you can programatically set it during installation), and simply tweak it in your app settings as needed? Instead of having to walk the chain/join, you can just retrieve the setting level from the component directly.
  5. We don't typically spoon feed people answers. You're going to have to do some research on your own, then come back with specific questions. I'll get you started on your research: http://lmgtfy.com/?q=php+cronjob
  6. You're going to need to come up with something better than a stubborn dismissal and an appeal to anecdotal evidence. Again, people who have trouble jumping from language to language are people who never understood what they were doing to begin with. They're cargo cult programmers, copying and pasting and blindly mimicing whatever they find in a tutorial or book because it works, or it seems like it works, or because someone in authority told/showed them to do it that way. That's not a flaw of PHP, the language, but rather a human flaw. Correlation != causation. And if you really want to swap anecdotes, I've encountered just as many shitty .NET programmers who think that programming consists of dragging server controls onto the canvas and supplying db connection strings.
  7. You're making a lot of generalizations based on incomplete data. For one, setting up PHP can be trivial. apt-get apache2, apt-get php5. There you go. Second, other languages have the same sort of setup issues. With C, you generally need to know how to compile, how to create makefiles, how to handle the inevitable seg faults, etc. Third, the samples you see here are skewed. This is a help forum. Of course most of the people here don't know what they're doing. That's why they're here. You can't take what happens here or on other help sites as a real indication of anything. Fourth, even beyond that, the 4-5 years experience thing you mention happens in every technical profession. It's generally accepted that it takes 10 years for someone to really become proficient in what they do. Given the broad application of websites/apps, the public perception that anyone can be the next Zuckerberg, and the fact that the profession lends itself to part-time freelancing, how many of the people here write PHP as their full-time job? 4-5 years is really usually 1-2 years of practical experience. Fifth, someone abusing a framework merely says that the person was too ignorant/lazy to learn the basics. It'd be like blaming Python for Django. Sixth, there's nothing inherent within PHP that makes it a bad language to teach the basics with. It has C-style syntax. It has straightforward scoping. It has easy-to-create custom functions. It has arrays, and strings, and the host of usual primitives. It has the host of usual operators, including the unary increment/decrement operators and the always fun ternary operator. It even has rudimentary OO with a familiar syntax. Aside from being dynamically typed, it meets all the requirements of a first semester intro language. The problems you cite are problems with people. People who foolishly think they have the next Facebook, who believe their scriptkiddie son/daughter/niece/nephew/cousin that programming is trivial, and think that blindly copying 6-10 year old tutorials are all it takes. Most of those people would fail at anything technical. There's a reason why those of us that are good get paid very well. Not everyone can do what we do. And like any technical professionals, our path to success is littered with people who couldn't hack it, for one reason or another. But that reason is very rarely the tool used.
  8. Opinions without any knowledge behind them are useless. You very clearly don't know what a framework is, yet have already made up your mind on them. When called on your ignorance, you got defensive. How is that meaningful to anyone? Instead of chiming in on a topic you know nothing about, maybe you could take the time to learn?
  9. As someone who writes both PHP and .NET (C#), I find this to be laughable. Programming != syntax. If you're competent, you can create programs in any language. And there's nothing in PHP that isn't suitable for a beginner to learn. Indeed, it's ubiquity and ability to spit out HTML on the fly make it a perfect candidate, as beginners get results immediately without having to compile. Add in fairly verbose error messages, and it's one of the best languages around for teaching the basics - input, output, variables, arrays, functions, expressions.
  10. $this and -> are parts of PHP's object oriented syntax. Unless you're learning OOP, you can safely ignore them.
  11. KevinM1

    Symfony

    Symfony2 comes with the Twig templating system by default, so you'd probably be better off learning that. I agree with the others in that S2 is the best PHP framework available right now. There definitely is a bit of a learning curve, especially as you go deeper down the rabbit hole, but it's worth learning, IMO. Regardless, you should also learn how to use the following: 1. Composer - essential for real development. Learn it, love it, use it. 2. Git, or some other form of VCS. Git's popular because the basics are easy enough to learn, the way it tracks versions is lightweight, and it's distributed 3. Unit testing (PHPUnit) Unit testing is probably the hardest to get used to, because it means programming in a different way.
  12. This sounds really convoluted, and not at all like good OO design.
  13. Why can't you just use git on your dev machine and push to either GitHub or BitBucket?
  14. Are you running queries in loops? Because that will bring any system to its knees.
  15. It might be helpful if you told everyone what version of Apache you're using and what (with examples) you've tried so far.
  16. 1. Are you sure your query is working? Have you run it in phpMyAdmin? 2. Have you simply tried (with the code above) echo "<img src=\"{$recipe['image']}\" /><br />"; ??
  17. Except, polymorphism is a key component of object orientation. It facilitates modularity and extensibility. Not really. Just because you use objects, and just because it works, doesn't mean it's well designed. And, realize that the criticism isn't that it's not 100% platform agnostic out of the box, but rather it's designed in a way that makes it relatively difficult to expand beyond using a single database, or expand beyond using MySQL. Ultimately, since we strive to teach best practices here, it's not an example we can support or endorse.
  18. In the future, please post questions about your PHP code in our PHP Coding Help section, and place any code you want us to see within tags (you can either do that manually, or by clicking the <> button on the editor).
  19. Put more succinctly: if you have to continue changing your class code just so it can work in different environments, you're doing it wrong.
  20. Please don't bump up a 2+ month old topic.
  21. Leave everything but their CC info (number, security number) sticky.
  22. Like trq said, BS. Design patterns are design patterns, not OO-only patterns. They can be implemented procedurally or functionally as well. Have you ever taken a class on assembly language? Operating systems? Compilers and linkers? Drivers? I'm pretty sure the answer is 'no', because if you did, you certainly wouldn't keep wrongly asserting that procedural code is amateurish.
  23. I'd pay money to see HoF in a university level course. His mind would be blown.
×
×
  • 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.