Jump to content

RabPHP

Members
  • Posts

    38
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

RabPHP's Achievements

Member

Member (2/5)

0

Reputation

  1. Greetings, I know nothing about PHP Web services or SOAP. I have a vendor who needs me to package an XML file as an object in what I am assuming is a SOAP transaction using cURL but do not have the foggiest isea where to begin. Advice appreciated. Rab
  2. I have a web application which integrates with a locally installed application. For this integration to work I need to write a file to a specific directory on the computer that is viewing the website. I know there are security issues with this however I can lock it down to only allow 1 site to access this directory through typical windows applications. I am looking for ideas on how to do this as I have tried changing permissions, creating shares and so far nothing has worked. I have even tried installing IIS on the local PC and accessing the file through http://localhost however that returns: Warning: fopen(http://localhost/test.xml) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections Any advise appreciated.
  3. Those portions of the string contining a 1 or a 2 are uniform, I simple did a str_replace before subjecting your code on the string and it resolved the problem. Much appreciated! Rab
  4. Ok one more final addition. Sometimes there is a number outside of the parenthesis, it's always either a 1 or a 2. How do I strip off the first character if it's a 1 or 2? Rab
  5. Greetings, I have a variable that looks like "THISISSOME(2 EXTREMELY)RANDOMDATA12345AP" I need to strip out the random data and return everything after the first occurance of a number that is not inside a parenthesis. In this example, I want to only get 12345AP. The data may be random wordsand characters without a defined length. This one has me baffled but I know it's possible, please advise! Thanks Rab
  6. Greetings, I have an HTML which I open and read. I need to convert the HTML tags to RTF tags. I am looking for some sort of HTML to RTF converter code or class. Anyone know where one can be found? RabPHP
  7. What if I were to install PHP and IIS on the WXP box then lock it down to only allow http connections from a specific IP. I can have the remote site call http://localhost/do_integration.php which would launch local php script that writes the file? Is that really my only option? Rab
  8. Thats why I imaging either an activeX install or something. I've seen it done on other links where once you click on a link it launches a locall installed program of sorts. Just looking for a direction to start researching. Thanks. Dan
  9. Greetings, I am developing a web based application which interfaces with another application by writing an XML file to the local PC when they click on a specific link. I am not sure how to do this but it may require some sort of ActiveX install. Anyone with any ideas to point me in the right direction? Rab
  10. Ultimately I am trying to take this data out of a huge text file that I can't control the output. If this field were enclosed with quotes is there a function or something in PHP that I can use specifically for this field? I am looking for some sort of insight into how I can make this work. Thanks for your help. Rab
  11. Hey Guys, I have a text file that is deliminated by either Semi-Colons or Pipes. I am using this function to read them and put into an array: $readfile = file("testimport1.txt"); for ($k=0; $k<=count($readfile)-1; $k++) { $fields = split(";",$readfile[$k]); One of the fields is a description containing several paragraphs. I find that this function will not recognize that the description is between semi-colons or Pipes and counts each new line in that field as a new record. Is there anyway to get around this? Rab
  12. Thanks! Very interesting way of looking at it the way PHP does, great insight. Rab
  13. Greetings, Here is an issue I am running into. I have an XML that looks like the following: <Query> <Patient> <Study> <PatientID>1145566</PatientID> <StudyCode>x333333</StudyCode> </Study> <Study> <PatientID>1145566</PatientID> <StudyCode>x222222</StudyCode> </Study> </Patient> <Patient> <Study> <PatientID>1145566</PatientID> <StudyCode>x4444444</StudyCode> </Study> <Study> <PatientID>1145566</PatientID> <StudyCode>x6666666</StudyCode> </Study> <Study> <PatientID>1145566</PatientID> <StudyCode>x55555555</StudyCode> </Study> </Patient> </Query> My Code looks like the following: $PAT_ID = '1145566'; $xmlstring = file_get_contents("patients.xml"); $xml = new SimpleXMLElement($xmlstring); foreach ($xml->Patient as $Patient) { if (strtolower($Patient->Study->PatientID) == "$PAT_ID") { $sid = $Patient->Study->StudyCode . "</p>"; echo($sid); } } When I do this, I only get the first StudyCode for each Patient. I would like to get the StudyCodes for Each Study. The PatientID in the file will always be the same, therefore I don't need that to actually be the qualifyier. I just want to get the StudyCode for each Patient and set it as a variable. I am really stumped, but know that I need to not just loop through patients but also loop through the Studies. I am bad with nested loops, please advise if anyone can help. Rab
  14. Greetings, I need to write a script which will pass paramters to another web page which will then return an XML result. I then loop through the XML data to get the relevant data and use that data to reform some Links. I need some guidance on a few items. 1) The script is password protected with a password, how can I auto-authenticate and pass a username and password to the browser automatically? This script will run on the backend so there will be no user involvement. 2) Once I am authenticated, can I simply use fopen to get this page? 3) If yes to the above, can I then use simpleXML() to loop through the data to find the relevant pieces? Any ideas greatly appreciated.
  15. This works perfectly and allows me to seperate everything out nice and neat, thanks! Rab
×
×
  • 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.