Jump to content

read XML data from URL


vinsky2002

Recommended Posts

Hello,

I am new with XML and PHP. I am having problem reading XML data from a source URL. However; the source URL does not supply any filename at it's end. meaning, the data is just send from the URL with out any given filename at all.

I am having a hard time reading this or capturing the return value from so. Please HELP. Thank you.


Cheers !

vins
vinsky2002@yahoo.com
Link to comment
Share on other sites

[!--quoteo(post=368867:date=Apr 26 2006, 11:29 PM:name=kenrbnsn)--][div class=\'quotetop\']QUOTE(kenrbnsn @ Apr 26 2006, 11:29 PM) [snapback]368867[/snapback][/div][div class=\'quotemain\'][!--quotec--]
What have you attempted so far? Please post the script.

Ken
[/quote]


<?PHP
if(!function_exists("file_get_contents"))
{
function file_get_contents($filename)
{
if(($contents = file($filename)))
{
$contents = implode('', $contents);
return $contents;
}
else
return false;
}
}
?>

<title>file_get.php</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">

<?
$origin2 = 'https://twyp.secure-ing.com/ncol/test/orderdirect.asp?orderID=4141&PSPID=fastport&PSWD=1stdata&amount=103777&currency=EUR&COM=sample data 10&CN=Brown, Jeine VIIII&BRAND=VISA&CARDNO=4111111111111111&ED=11/06&EMAIL=vinson_isap@yahoo.com';

$siteval = file_get_contents($origin2);

echo '<br><br>';
echo 'this is a test result <br><br>';
echo $siteval;
echo '<br>';
?>

I have try this one, but the site that had been returning the XML data that i needed is a secured one (HTTPS). with the normal site i was able to get the content for my process. Thank You, very much.

Oh, by the way the host i am using or that is made available for me is running IIS 4.0 i think.


Cheers !

vins


Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.