www.webdeveloper.com
Results 1 to 3 of 3

Thread: Simple Class

  1. #1
    Join Date
    Oct 2008
    Location
    Seattle, Wa
    Posts
    695

    Simple Class

    I'm trying to teach myself OO pretty quickly, so I was wondering if someone
    would mind giving me a quick "homework" type assignment so I can build a
    few classes and get a lift off on what I need to do. Anything would help!

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,614
    How about a wrapper for the cURL functions, with properties and/or methods for the most common curl_setopt() settings. Something you could use along these lines:
    PHP Code:
    $curl = new Curl($someUrlString);
    $curl->returntranser true;
    $curl->postData($anAssocArrayOfData); // would also turn on CUROPT_POST
    $result $curl->exec(); 
    Possibly the constructor could include optional parameters for some of the most common settings.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Oct 2008
    Location
    Seattle, Wa
    Posts
    695
    Great idea Nog, ill work on it over the weekend. Thx man!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles