Jump to content

[SOLVED] Saving Files


AnotherQuestion

Recommended Posts

I have an application that connects to a third party server to retrieve vehicle details. These are sent back in xml.

 

The form I have created includes one textbox. The user enters their registration no into the TxtReg box. When the form is posted is passes the registration no through to the next page as URL Var.

 

<?php

 

$data = file_get_contents("https://vrm.mamsoft.co.uk/vrmlookup/vrmlookup.asmx/Find?Username=foo&Password=bar&Vrm=$_GET['RegNo']");

 

$fp = fopen("../Vrmdata.xml", "r");

 

fwrite($fp, $data);

fclose($fp);

 

?>

I am getting no errors but the file is not saving.

What am i doing wrong?

Link to comment
https://forums.phpfreaks.com/topic/172617-solved-saving-files/
Share on other sites

I have just change the file option to "w" and that doesnt work either

 

$data = file_get_contents("https://vrm.mamsoft.co.uk/vrmlookup/vrmlookup.asmx/Find?Username=JOE&Password=BLOGGS&Vrm=".$_GET['RegNo']); 
$fp = fopen("Vrmdata.xml", "w");
fwrite($fp, $data); 
fclose($fp); 

Link to comment
https://forums.phpfreaks.com/topic/172617-solved-saving-files/#findComment-913225
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.