[twitter-dev] Re: error with simple xml load file
Hello, i have a question, How use it with xml api format??? See, i'm using the http://twitter.com/statuses/friends_timeline.xml to get the friends timeline for my app but i don't know how use it the data with SimpleXML Please help!! chepe263 On Jul 27, 10:23 pm, jmathai jmat...@gmail.com wrote: JDG is probably correct. $ch = curl_init('http://search.twitter.com/search.atom?q=Google'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); $sXml = simplexml_load_string($result); var_dump($sXml); On Jul 27, 4:45 pm, oscarva osca...@gmail.com wrote: Please help :( On 25 jul, 01:05, oscarva osca...@gmail.com wrote: I am tring to do a Api call using simple xml and twitter search API. $rss = simplexml_load_file('http://search.twitter.com/search.atom? q=Google'); foreach ($rss-channel-item as $item){ $title = utf8_decode($item-title); $url = $item-link; } The error log tells me the following: PHP Warning: simplexml_load_file() [a href='function.simplexml-load- file'function.simplexml-load-file/a]: I/O warning : failed to load external entity quot;http://search.twitter.com/search.atom? q=Googlequot; in /home/xxx/public_html/test/status.php on line 10 [error] [client 166.210.xxx.xxx] PHP Warning: simplexml_load_file (http://search.twitter.com/search.atom?q=Google) [a href='function.simplexml-load-file'function.simplexml-load-file/a]: failed to open stream: Connection timed out in /home/xxx/public_html/ test/status.php on line 10 PHP Version 5.2.8 This only happens on my server, since in local working properly. :( Please Help. Thaks ;)
[twitter-dev] Re: error with simple xml load file
You need to allow PHP to access 3rd party (external) domains and grab files from them. In your php.ini you should change this: allow_url_fopen = Off To: allow_url_fopen = On Also, if your host allows you to place php.ini files in the directory just put this in a new php.ini file. [PHP] allow_url_fopen = On On Sun, Aug 30, 2009 at 4:22 PM, chepe263 chepe...@gmail.com wrote: Hello, i have a question, How use it with xml api format??? See, i'm using the http://twitter.com/statuses/friends_timeline.xml to get the friends timeline for my app but i don't know how use it the data with SimpleXML Please help!! chepe263 On Jul 27, 10:23 pm, jmathai jmat...@gmail.com wrote: JDG is probably correct. $ch = curl_init('http://search.twitter.com/search.atom?q=Google'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); $sXml = simplexml_load_string($result); var_dump($sXml); On Jul 27, 4:45 pm, oscarva osca...@gmail.com wrote: Please help :( On 25 jul, 01:05, oscarva osca...@gmail.com wrote: I am tring to do a Api call using simple xml and twitter search API. $rss = simplexml_load_file('http://search.twitter.com/search.atom? q=Google'); foreach ($rss-channel-item as $item){ $title = utf8_decode($item-title); $url = $item-link; } The error log tells me the following: PHP Warning: simplexml_load_file() [a href='function.simplexml-load- file'function.simplexml-load-file/a]: I/O warning : failed to load external entity quot;http://search.twitter.com/search.atom? q=Googlequot; in /home/xxx/public_html/test/status.php on line 10 [error] [client 166.210.xxx.xxx] PHP Warning: simplexml_load_file (http://search.twitter.com/search.atom?q=Google) [a href='function.simplexml-load-file'function.simplexml-load-file/a]: failed to open stream: Connection timed out in /home/xxx/public_html/ test/status.php on line 10 PHP Version 5.2.8 This only happens on my server, since in local working properly. :( Please Help. Thaks ;) -- - Adam Shannon ( http://ashannon.us )
[twitter-dev] Re: error with simple xml load file
Yes JDG im used youtube api, yelp api, google api, technorati, and more. and all works correctly, I just happened to twitter :( On 27 jul, 22:17, JDG ghil...@gmail.com wrote: does your hosting service allow remote connections to be made? that is, can you use similar code to connect to any other sites? On Sat, Jul 25, 2009 at 00:05, oscarva osca...@gmail.com wrote: I am tring to do a Api call using simple xml and twitter search API. $rss = simplexml_load_file('http://search.twitter.com/search.atom? q=Google' http://search.twitter.com/search.atom?%0Aq=Google%27); foreach ($rss-channel-item as $item){ $title = utf8_decode($item-title); $url = $item-link; } The error log tells me the following: PHP Warning: simplexml_load_file() [a href='function.simplexml-load- file'function.simplexml-load-file/a]: I/O warning : failed to load external entity quot;http://search.twitter.com/search.atom? q=Googlequot http://search.twitter.com/search.atom?%0Aq=Google;; in /home/xxx/public_html/test/status.php on line 10 [error] [client 166.210.xxx.xxx] PHP Warning: simplexml_load_file (http://search.twitter.com/search.atom?q=Google) [a href='function.simplexml-load-file'function.simplexml-load-file/a]: failed to open stream: Connection timed out in /home/xxx/public_html/ test/status.php on line 10 PHP Version 5.2.8 This only happens on my server, since in local working properly. :( Please Help. Thaks ;) -- Internets. Serious business.
[twitter-dev] Re: error with simple xml load file
Please help :( On 25 jul, 01:05, oscarva osca...@gmail.com wrote: I am tring to do a Api call using simple xml and twitter search API. $rss = simplexml_load_file('http://search.twitter.com/search.atom? q=Google'); foreach ($rss-channel-item as $item){ $title = utf8_decode($item-title); $url = $item-link; } The error log tells me the following: PHP Warning: simplexml_load_file() [a href='function.simplexml-load- file'function.simplexml-load-file/a]: I/O warning : failed to load external entity quot;http://search.twitter.com/search.atom? q=Googlequot; in /home/xxx/public_html/test/status.php on line 10 [error] [client 166.210.xxx.xxx] PHP Warning: simplexml_load_file (http://search.twitter.com/search.atom?q=Google) [a href='function.simplexml-load-file'function.simplexml-load-file/a]: failed to open stream: Connection timed out in /home/xxx/public_html/ test/status.php on line 10 PHP Version 5.2.8 This only happens on my server, since in local working properly. :( Please Help. Thaks ;)
[twitter-dev] Re: error with simple xml load file
does your hosting service allow remote connections to be made? that is, can you use similar code to connect to any other sites? On Sat, Jul 25, 2009 at 00:05, oscarva osca...@gmail.com wrote: I am tring to do a Api call using simple xml and twitter search API. $rss = simplexml_load_file('http://search.twitter.com/search.atom? q=Google' http://search.twitter.com/search.atom?%0Aq=Google%27); foreach ($rss-channel-item as $item){ $title = utf8_decode($item-title); $url = $item-link; } The error log tells me the following: PHP Warning: simplexml_load_file() [a href='function.simplexml-load- file'function.simplexml-load-file/a]: I/O warning : failed to load external entity quot;http://search.twitter.com/search.atom? q=Googlequot http://search.twitter.com/search.atom?%0Aq=Googlequot; in /home/xxx/public_html/test/status.php on line 10 [error] [client 166.210.xxx.xxx] PHP Warning: simplexml_load_file (http://search.twitter.com/search.atom?q=Google) [a href='function.simplexml-load-file'function.simplexml-load-file/a]: failed to open stream: Connection timed out in /home/xxx/public_html/ test/status.php on line 10 PHP Version 5.2.8 This only happens on my server, since in local working properly. :( Please Help. Thaks ;) -- Internets. Serious business.
[twitter-dev] Re: error with simple xml load file
JDG is probably correct. $ch = curl_init('http://search.twitter.com/search.atom?q=Google'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); $sXml = simplexml_load_string($result); var_dump($sXml); On Jul 27, 4:45 pm, oscarva osca...@gmail.com wrote: Please help :( On 25 jul, 01:05, oscarva osca...@gmail.com wrote: I am tring to do a Api call using simple xml and twitter search API. $rss = simplexml_load_file('http://search.twitter.com/search.atom? q=Google'); foreach ($rss-channel-item as $item){ $title = utf8_decode($item-title); $url = $item-link; } The error log tells me the following: PHP Warning: simplexml_load_file() [a href='function.simplexml-load- file'function.simplexml-load-file/a]: I/O warning : failed to load external entity quot;http://search.twitter.com/search.atom? q=Googlequot; in /home/xxx/public_html/test/status.php on line 10 [error] [client 166.210.xxx.xxx] PHP Warning: simplexml_load_file (http://search.twitter.com/search.atom?q=Google) [a href='function.simplexml-load-file'function.simplexml-load-file/a]: failed to open stream: Connection timed out in /home/xxx/public_html/ test/status.php on line 10 PHP Version 5.2.8 This only happens on my server, since in local working properly. :( Please Help. Thaks ;)