Hey everyone.  I am having some trouble with this model class. The error it
is giving me is  the following:
"*Parse error*: syntax error, unexpected ';', expecting T_FUNCTION" on the
last line with the bracket.
Any advice?

Model Class:
uses('Xml');
    function isValid($value)
    {
        $url = "http://www.website.com/product.xml?x=
".$this->$data[$this->$name]['value1']."y=".$this->$data[$this->$name]['value2'];
        $agent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1";
        $curl_thing = curl_init();
        curl_setopt($curl_thing, CURLOPT_URL, $url);
        curl_setopt($curl_thing, CURLOPT_HEADER, 0);
        curl_setopt($curl_thing, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($curl_thing, CURLOPT_USERAGENT, $agent);
        $curl_result = curl_exec($curl_thing);
        curl_close($curl_thing);

        $thingResponse = new Xml($curl_result);
        $thingResponse->toArray();
        $valid = set::check($thingResponse, 'X.Y');
    }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to