Jump to content

Adam

Moderators
  • Posts

    5,717
  • Joined

  • Last visited

  • Days Won

    6

Adam last won the day on October 20 2013

Adam had the most liked content!

About Adam

  • Birthday 07/24/1989

Profile Information

  • Gender
    Male
  • Location
    Sheffield / UK

Recent Profile Visitors

13,978 profile views

Adam's Achievements

Advanced Member

Advanced Member (4/5)

73

Reputation

  1. Okay, think you should have introduced your project a little earlier The comments I wrote at #8 were answered on the next page.
  2. Also.. Shouldn't there be an option to optionally define a type for each parameter, like in #4? Forcing a type is going to break about 99% of PHP scripts out there.
  3. Welcome! How do you know it's nearly 2 million, out of interest?
  4. Just out of curiousity, where does the name Labradoodle-360 come from? Whilst in the midst of a 360 degree spin did you discover your talent for breeding unusual dog hybrids?
  5. What exactly do you have 100 switch cases against? You're doing something wrong, or should I say there's a much better way of doing it. Edit Also I work in a development team, and whatever files you're working on, the use of version control takes away of lot of those problems. Again, if you're having a lot of troubles, you're doing something wrong.
  6. Since the more robust DOM extension also requires you to provide the URI of the namespace, not the namespace prefix, I'm guessing there's a reason. What comes to mind is probably that you can define a namespace for a sub-element without a prefix, that would make it impossible to distinguish one from the other. So my guess is it's to prevent any ambiguity.
  7. Just to add to Maq's post, to use the dialog() widget you need to also include the jQuery UI library (core + Dialog widget).
  8. Although you could use DB management software over the top if you would find that easier..? Don't know any to suggest to you, but Google found plenty.
  9. A quick search on Google found a similar website - although their concept of result-only access was developed by an idiot.
  10. You would be best off running it from the command line, as then you won't run into time-out issues or require a browser to be left open running it. Although I'd check your host's terms of use because they might not want you running spiders on their servers.
  11. No problem, and it turns out you can. I didn't realise this before, which is why I suggested you're likely talking about classes due to the similar syntax. Once you've called the parent function you're also able to call the child function directly: function foo() { function bar() { echo 'baz'; } } foo(); bar(); // echoes "baz" In response to your original question though, you don't need to define a function within a function to call it. Functions can call any functions that have been defined. Recursion is a function calling itself. Doesn't neccesarily need to return anything or call any additional functions, just call itself.
  12. system accepts a second parameter to store the response from the server. Instead of echoing it, store the result and use that variable in your comparison. $5 is not a valid custom variable name by the way, as it starts with a number.
  13. You can't have a function within a function. You're most likely thinking of classes: class Foo { function bar() { // ... } } These are a very different concept, far beyond the scope of this post. If you would like to learn more though there's plenty of information in the manual, and an Object Orientated PHP Tutorial on the main site here. Recursion is something completely different, it's basically a function calling itself. For example a function that can take either an array or string as an argument, but if it's an array calls itself with each string item in the array. Very simple example: function recursion($arg) { if (is_array($arg)) { foreach ($arg as $str) { recursion($str); } } if (is_string($arg)) { echo $arg . "\n"; } } recursion(array('foo', 'bar')); recursion('baz');
  14. You would be right, and that's exactly your problem. HTTP requests are relatively slow, and making (what sounds like you're trying to) thousands at a time is a ridiculous load on both your server and theirs. This problem is generally overcome by "scraping" their website, page by page with a courteous delay in between, indexing the data in your own database and then querying that for the details later. Think search engines. This is of course assuming you're not violating their terms of use, and they may still block you. I'm surprised they haven't already if you're firing off even 10 requests at once - probably just a matter of time till they notice to be honest.
  15. Read this ^ .. You're basically updating the data after you've already displayed it, which is obviously not going to show the updated data until the next request.
×
×
  • 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.