Jump to content

Buchead

Members
  • Posts

    59
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Buchead's Achievements

Member

Member (2/5)

1

Reputation

  1. I'm sure most will laugh at this but I'm new to php classes and been some code to alter that has me a little confused. I understand that to call a class function you use $object->function(). However the code I have has $object1->$object2->function(). Does this mean that within $object1 it has objects created that are written to one of it's variables? Sorry again for the stupid question, and thanks!
  2. Thank you all for the responses. After seeming some code that had exceptions where simple validations were being performed (such as checking for specific characters in a string) they threw an exception when I thought simply returning true or false would suffice. Needless to say I have soo much still to learn and understand!
  3. Apologies if this isn't the right place for this but have a query about try-catch and when to use it. Different articles I've read all say different things. Should they be used when a class object is created, whilst some articles say you should throw an exception whenever a calculation is attempted and something goes wrong (such as invalid option). On the other hand, some code I've seen pass true or false back from a calculation based upon the result. I appreciate there's no hard or fast rules and it may be down to personal preferences, but are there any rough guidelines to follow? Are there any articles or books that are worth reading that could help someone new to php5 understand it a little better. Many thanks.
  4. That worked perfectly. Thank you very much.
  5. Hi, I have a table for test results: `results` resultID year class person result What I'm attempting to do is pull out the top person from each year for a given class. I can get it pull out 1 person per year, however it's not the top result. Tried using inner queries with different join but none work. Is what I'm attempting possible or should the query be cycled through with the year specified each time? Many thanks.
  6. The 3rd party app uses port 21 and nowhere can it be configured to use another port. Many thanks for your advice, it's been extremely useful.
  7. Excellent, thanks for that. But would it prevent ftp'ing of files? We don't actually have control over apache on the server so is it easy to do? Sorry for all the questions but never encountered this before.
  8. Sorry, should have said. A 3rd party app is sending data to our server to update a web shop. After the username and password would be all the product information in csv format. I need to grab this data and then process it. What I'm struggling to do is grab the data. If they pointed it at a file on our server I could process it just like a form. Whether this is the right procedure I don't know, however it's how I've used HTTP POST in the past. As this data is being pointed at any file I can't see how to grab it. Hopefully this makes a little more sense now!
  9. Apologies if this is in the wrong thread but no sure where it should have gone (if anyone can tell me I'd appreciate it). Anyway, I'm having a problem with HTTP POST. In the header no file is being specified, only the root file system. All the other times I have used this a file is specified so how can I detect the data transfer and handle the data? The header: POST / HTTP/1.0. .Accept: */*..Accept-Language: en-us..Content-Type: application/x-www-form-urlencoded..Host: thesite.co.uk Content-Length: 135 Pragma: no-cache username=user&password=password It's coming through port 21 on the server. Someone suggested putting some form of listening app on the port but then they countered it saying this would prevent any files being ftp'd to the server. Any assistance would be greatly appreciated! Thanks.
×
×
  • 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.