Jump to content

EK

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

EK's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I have a SQL db that imported a bunch of website addresses from an XML feed. Some of the urls are formatted: http://google.com\folder I would like to do a find/replace to search for the string 'google.com\' and then replace all the '\' with '/' I tried to use: SELECT REPLACE('google.com\', '\', '/'); but it returned: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\', '/')' at line 1 Any help would be appreciated
  2. Thanks for the help. Actually my $var1 needed to be a string, something like 300var So I changed if (stripos($paragraph, $var1)=='0') { to if (stripos($paragraph, $var1) !== false) { and it worked perfectly! Thanks!
  3. I want to write a conditional statement like the following: if ($value = "300x") { however, I want this to work if x is changed to anything. So the conditional should work if the following is true: if ($value = "300dog") { or if ($value = "300cat") { How do I make it work as long as 300 is present regardless of what follows after. Thanks in advance!
  4. So what I mean, is that as soon as I do $result = curl_exec($ch); it makes that above line of output appear. How take this output and put it into a string, so I can manipulate the data before moving onto the next page?
  5. I'm doing a cURL post to a server and it returns "true No_Error Data was accepted 10356546 3770 false 0 " Form --> Method=Post --> submit.php (this is the page that's doing the cURL post and the server returns data that appears on this page). How do I take this and put it into a string?
  6. This is in my PHP code: $xml = simplexml_load_file('https://www.....com/...Receiver'); print_r($xml); My output looks like this: SimpleXMLElement Object ( [isValidPost] => false [ResponseType] => LeadType_ID_Missing [ResponseDetails] => Lead Type ID (LID) is required, please refer to the post documentation [LeadIdentifier] => 0 [VendorAccountAssigned] => 0 [PendingQCReview] => false [Price] => 0 ) My goal is to get variables that I can pass elsewhere. For example I want to get [ResponseType] out so I can pass it in a URL string for example. Ex of how I'd like to use the code: header ("Location: nextpage.php?[ResponseType]=$ResponseType")
  7. OK got it working now with simplexml_load_file Not sure how to parse the resulting code though. I'm getting something like: [Variable] => Value [Variable] => Value [Variable] => Value [Variable] => Value Thanks for your help.
  8. Thanks for the suggestion, but I'm getting errors that I can't include files from external domains when I try to use simplexml_load_file. Any other suggestions?
  9. I looked at your code at the domain. You're not closing <div id="leftCntr"> somewhere before <div id="rightCntr">. You shouldn't use the IE hack for this (post #2). That's more to correct small misalignments. This is a structural problem. What you need to do is go through the code line by line to figure out where you're leaving it open. When using WP, you should not carry divs over into other files. So if you have: 1 <div id="header"> 2 </div> 3 <div id="content"> 4 </div> You want to cut the file after line 2, not before it.
  10. I have a form that I'm posting the contents to a 3rd party data management server via cURL. They return XML to let you know if the data was posted successfully or not. I'm trying to figure out how I can take that return XML and parse the data out of there. Now my question is, when the data posts and the XML is returned, how do I capture that? When I don't use cURL and post directly using HTTP POST, I get the XML returned at the exact same address I post to. So to process the XML returned, is this code correct? I'm kind of at a loss on what to do from this point... Thanks to anyone who takes the time to read and can help!
×
×
  • 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.