...

View Full Version : File Get Contents



balkan
03-02-2009, 05:48 PM
Get contents for exchange.
How can I arrange all the words in the line, can someone help me with code?

The code is xml placed on asp document:
exchange.asp

<curencyexchange>

<exchange>
<id>978</id>
<expr>MKD</expr>
<exch>EUR</exch>
<amount>1</amount>
<value>61.4129</value>
</exchange>

<exchange>
<id>036</id>
<expr>MKD</expr>
<exch>AUD</exch>
<amount>1</amount>
<value>31.0213</value>
</exchange>

<exchange>
<id>124</id>
<expr>MKD</expr>
<exch>CAD</exch>
<amount>1</amount>
<value>38.3927</value>
</exchange>

<exchange>
<id>208</id>
<expr>MKD</expr>
<exch>DKK</exch>
<amount>100</amount>
<value>824.3564</value>
</exchange>

<exchange>
<id>392</id>
<expr>MKD</expr>
<exch>JPY</exch>
<amount>100</amount>
<value>50.1739</value>
</exchange>

<exchange>
<id>578</id>
<expr>MKD</expr>
<exch>NOK</exch>
<amount>100</amount>
<value>703.0670</value>
</exchange>

<exchange>
<id>752</id>
<expr>MKD</expr>
<exch>SEK</exch>
<amount>100</amount>
<value>541.4501</value>
</exchange>

<exchange>
<id>756</id>
<expr>MKD</expr>
<exch>CHF</exch>
<amount>100</amount>
<value>4148.1189</value>
</exchange>

<exchange>
<id>826</id>
<expr>MKD</expr>
<exch>GBP</exch>
<amount>1</amount>
<value>69.8112</value>
</exchange>

<exchange>
<id>840</id>
<expr>MKD</expr>
<exch>USD</exch>
<amount>1</amount>
<value>48.1179</value>
</exchange>

<exchange>
<id>191</id>
<expr>MKD</expr>
<exch>HRK</exch>
<amount>100</amount>
<value>821.7086</value>
</exchange>
</curencyexchange>

PHP code:

<?php $url = file_get_contents('http://www.site.com/exchange.asp');
echo $url; ?>

Fumigator
03-02-2009, 06:48 PM
What do you want to do? Describe the situation and what you want to accomplish.

balkan
03-02-2009, 07:58 PM
i want any content in kurs.asp to take out from it and order.

for example:
EUR 1 61.41
USD 1 48.12

Fumigator
03-02-2009, 10:19 PM
i want any content in kurs.asp to take out from it and order.

:confused:

Care to phrase that in a way that makes sense to someone who doesn't know what you are trying to do?

tosbourn
03-03-2009, 05:40 PM
http://www.digital-web.com/articles/php_and_xml_sitting_in_a_tree/

Should help you.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum