<li class="first">&copy; 2009 Twitter</li>

Is from from an html page (look at the bottom of http://twitter.com) It
looks like some times you are not getting xml returned. Can you post a dump
of the what the twitter is returning when the error happens? Also the http
status from the call.

2009/5/20 RTuosto <[email protected]>

>
> I'm getting the following 3 errors:
>
> Warning: simplexml_load_string() [function.simplexml-load-string]:
> Entity: line 62: parser error : Entity 'copy' not defined in C:\wamp
> \www\TTT1\includes\twitter.functions.php on line 96
>
> Warning: simplexml_load_string() [function.simplexml-load-string]: <li
> class="first">&copy; 2009 Twitter</li> in C:\wamp\www\TTT1\includes
> \twitter.functions.php on line 96
>
> Warning: simplexml_load_string() [function.simplexml-load-string]: ^
> in C:\wamp\www\TTT1\includes\twitter.functions.php on line 96
>
> Here's my code:
>
> Function getFollowers($id, $login) {
>    $url = "http://twitter.com/followers/ids.xml?user_id="; . $id;
>    $ch = curl_init();
>    curl_setopt($ch, CURLOPT_URL, $url);
>    curl_setopt($ch, CURLOPT_VERBOSE, 1);
>    curl_setopt($ch, CURLOPT_USERPWD, $login);
>    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
>    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
>    $result = curl_exec($ch);
>    curl_close($ch);
>    $xml = simplexml_load_string($result);    // Line 96
>    $followers = array();
>    Foreach ($xml->id as $id) {
>        array_push($followers, $id);
>    }
>    return $followers;
> }
>
> Is this a problem on my end or is the xml document not loading
> properly?  It seems to load fine in my browser, and sometimes it
> works.  I'm even doing a rate-limit verification before calling this
> function to make sure the user can do it.
>
> What to do?
>



-- 
Abraham Williams | http://the.hackerconundrum.com
Hacker | http://abrah.am | http://twitter.com/abraham
Web608 | Community Evangelist | http://web608.org
This email is: [ ] blogable [x] ask first [ ] private.
Sent from San Francisco, California, United States

Reply via email to