Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder
    Join Date
    May 2006
    Posts
    1,680
    Thanks
    28
    Thanked 4 Times in 4 Posts

    Which do you use most and why: fsockopen, curl, fopen, file_get_contents

    Out of these, which one do you use most and why ?

    fsockopen, curl, fopen, file_get_contents,

    Out of these, which one do you use most and why ?

  • #2
    Regular Coder
    Join Date
    Dec 2006
    Location
    In the wilderness
    Posts
    106
    Thanks
    9
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by jeddi View Post
    Out of these, which one do you use most and why ?

    fsockopen, curl, fopen, file_get_contents,

    Out of these, which one do you use most and why ?
    Its all a matter of personal preference really, out of those file_get_contents would probably have to be the easiest to understand and its the one I prefer to use but I've read curl can be useful however I haven't delved into it yet.
    "The advantage of computers is that they do exactly what you tell them to do. The disadvantage of computers, on the other hand, is that they do exactly what you tell them to do."

    Excellent resource for learning PHP here

  • #3
    Senior Coder
    Join Date
    May 2006
    Posts
    1,680
    Thanks
    28
    Thanked 4 Times in 4 Posts
    Thanks for your comment.

    There are many occasions when you can get your result
    using 2 or 3 of these methods and you need to decide which
    is the most appropiate one to select.

    I have not used fsockopen, but the others I have used
    and want to learn more from experienced coders.

    Knowing the reasons for selecting one function over another
    for a certain task will be helpful so thanks again
    for you input

  • #4
    Senior Coder kbluhm's Avatar
    Join Date
    Apr 2007
    Location
    Philadelphia, PA, USA
    Posts
    1,509
    Thanks
    3
    Thanked 258 Times in 254 Posts
    I tend to use whichever is necessary and completes the task most efficiently.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •