Re: [PHP-GTK] re : database connection and retrieving values
[email protected] (Mark Skilbeck) Thu, 15 Jul 2010 14:10:36 +0100
| Newsgroups | php.gtk.general |
|---|---|
| Message-ID | <[email protected]> |
Well, you just need to make a simple HTML request. That's as easy as
file_get_contents('http://thesite.com/page.xml');
You can then parse that with your favourite XML tool, and use the data
to build a GtkListStore and stick that into a GtkTreeView[1].
To your MySQL problem, I assume your database isn't allowing remote
connections. However, that's a MySQL problem - not a PHP one, and should
be asked on a MySQL mailing list (forum, etc.).
You might also use the mysql_error() function to gain a better
understanding of why your script is failing.
Mark.
On 15/07/10 04:34, Raisun John Sunny wrote:
> Hi
>
> Thanx for the reply.
>
> I personaly do not like glade and prefer to use basic coding to complete
> this desktop widget.
>
> In the IRC node i was told that REST api can be used for this purpose.
> Now i checked with REST api, eventhough i understood what it is still i am
> in doubt. I know it returns an XML as an output.
>
> But how can i integrate this with php-gtk? and how can I use the data in the
> xml to dispaly on the widget window?
>
> This is how i want the widget to work:
>
> 1. the cusomer selects a city or country name
> 2. He receives the weather forecast for that day and also for the next 2
> days.
>
> Now i know sites that offer these services using REST api.
> (http://weather.weatherbug.com/)
>
> I have seen the output and it displays an XML file.
> (please check this link)
> http://a7587936892.api.wxbug.net/getStationsXML.aspx?ACode=A7587936892&zipCode=20874
>
> How can I use it in php-gtk and to display those results in a gtk window?
>
> Please reply if you know the answer to it. I hope I am not asking too much.
>
> thank you
> with warm regards
> Raisun
>
--
Mark Skilbeck
mahcuz.com | gtk.php.net | pecl.php.net/cairo | docs.php.net