Read XML files
Is this possible?
Please, help me, I need it... :) |
Re: Read XML files
If you want to read a file, with XML extension, it's possible. It's also possible to read a file with OINFNDW extension if you want.
PHP Code:
|
Re: Read XML files
You can read any plain text file (or even binary files if you know what you are doing) but there is nothing that is default that will actually parse a xml content. Look in the Code Snippets/Tutorials to see if it's been done. Also, search in the Scripting Help forum. If you can't find it then it's likely that you will have to create it. However, I don't expect that it would be an easy task unless you are only looking for a single value and you don't want all the information in the file.
Quote:
|
Re: Read XML files
But if I want to parse it with PHP script, how to send request to this PHP script and get returned data from PHP?
Someone tell me that is possible with socket, but I don't know how, please write me an example how to send request and get data. :/ |
Re: Read XML files
You have to use sockets to send/receive info from a webpage (your php script). There are many examples of this because it's a popular request. Also, check in the tutorials forum and see if there is a sockets tutorial.
|
Re: Read XML files
socket_open ( hostname[], port, protocol, &error )
Can u write me an example, how to connect, if my php file is here: www.somesite.com/myfile.php Which arguments will be in this functon if I want to use socket with this php file? Sry for bad english :/ EDIT: this site and php file doesn't exists, i want code for connecting socket with this file, based on this example... |
Re: Read XML files
Look at examples.
|
Re: Read XML files
PHP Code:
I must to get answer from server: 'pozzz' :/ I get this answer: PHP Code:
PHP Code:
|
Re: Read XML files
PHP Code:
|
Re: Read XML files
Tnx you man :)
I made plugin 'weather'. When u type /weather city_name, socket must to connect and send data to php script and get answer. That's work. I tested my plugin on server which is hosted on my computer. And that's work only when i type /weather city, but other players can't. Is it possible that sockets only can to connect from my computer, only from IP adress of my server, and how to resolve this problem? :/ PHP Code:
|
| All times are GMT -4. The time now is 07:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.