Jump to content

ignace

Moderators
  • Posts

    6,457
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by ignace

  1. XML and HTML are different formats. When you output XML there should be no HTML involved. Like ScottBaxter already mentioned is that you need to remove ALL HTML which you have failed to do so far. Your code contained a bunch of errors, so buying a book on PHP and reading it will help you in understanding what you are writing and will also give you a basic understanding of debugging. <?php header('Content-type: text/xml; charset=windows-1252'); print '<?xml version="1.0"?>'; $xml = simplexml_load_file("saft_solverde_wgres_FAC2-01-2013-500272484.xml"); foreach($xml->Invoice as $Invoice) { echo $Invoice->InvoiceNo; }
  2. Just because you saw another application have numbers on the end of their URL on their admin page, you need them to? Just append rand to your URL's then. $url .= '?' . rand();
  3. At the bottom click on English (USA) and select PHPFreaks - English (USA) that will resolve the issue. I will notify Philip that some have the same issues I faced.
  4. The code as posted should work. Do you have dbConnection defined more then once?
  5. Putting the session id in the URL is a bad idea because users tend to copy/paste these links to others or on some publicly visible medium. When someone would click this link they would actually hijack the user's session (they would appear to be the logged in user who copy/past'ed the link). NEVER put the session id in the URL.
  6. tl;dr Browsers do not fire any event when autocompleting the form fields. All I could find is that onchange should be the one to be called, nothing specific for the autocomplete though. I found this: https://code.google.com/p/chromium/issues/detail?id=42716 Which says that in Chrome it should fire the onchange event. The posted example: http://jsfiddle.net/bevancoleman/6SRYH/ Does not appear to fire the onchange event but instead fires the oninput event (chrome, mac), which is the same as onchange? There is a jQuery plugin for this though: http://furrybrains.com/2009/01/02/capturing-autofill-as-a-change-event/ Haven't tried it. Other things I found was: http://avernet.blogspot.co.at/2010/11/autocomplete-and-javascript-change.html http://stackoverflow.com/questions/4938242/browser-autofill-and-javascript-triggered-events I searched for "form autocomplete event" and "form autofill event"
  7. What is says is that you need to develop an app that instead of using a DB will use an API. For example the API exposes a listUsers method. So, you create a link that says List Users and when the user clicks it, queries the API and displays the results to the user.
  8. Indeed. It's even possible for some to look at MVC without seeing it. Not implying the pattern is hard just that it is easy for someone who does not fully grasp MVC to not see it because it has become so boilerplate and those that do have grasped it can toy with it however they want.class UserActions { private $userDbTable; public function register(RegisterForm $data) { .. return new RegistrationPage($data); } public function login(LoginForm $data) { $user = $this->userDbTable->findByEmailPassword($data->getEmail(), $data->getPassword()); if ($user) { return new RedirectTo('profile'); } return new LoginPage($data); } } class UserDbTable { public function findByEmailPassword($email, $password) { .. } } ..
  9. $url has to be an actual URL where as $img has to be a local path.
  10. Like thorpe already mentioned inject the class1 into class2 through the constructor and retrieve the string value through a getter method.
  11. $wsdl = "http://externalservices.qa.gameserver1-mt.com/WebSiteServices.asmx?wsdl"; $options = array('exceptions' => true, 'trace' => true); $client = new SoapClient($wsdl, $options); try { $result = $client->GetPlatformByUserAgent(array('pUserAgent' => $_SERVER['HTTP_USER_AGENT'])); } catch (SoapFault $e) { echo '<pre>'; var_dump($client->__getLastRequestHeaders()); var_dump($client-> __getLastRequest()); echo '</pre>'; }When you pass true to the trace option of the SoapClient you can view the request he made and what went wrong. The webservice seems down from here, so I can't test it.
  12. You can use fsockopen to test if a server is online, just change the timeout to the number of seconds you wish the server to respond. To get the hostname out of an URL you can use parse_url with second parameter PHP_URL_HOST.
  13. ../images/ha/haimg.php?skin=$skin refers to a local path. http://domain.top/images/ha/haimg.php?skin=$skin is an actual URL where ?skin= actually works.
  14. Look at your code. And read what AyKay47 said.
  15. We need to see your full code (or at least the relevant code) not just the line where the error occured.
  16. ignace

    Hey all

    Hi and welcome. If you have any PHP questions feel free to post in the PHP coding help section
  17. ignace

    export to csv

    Please use code tags
  18. ignace

    Header

    You can't. You can only do this if you open the document and then alter the sheet size and save it. With PHPWord you can open the word files and alter them.
  19. Look at what you wrote, and THINK why it may not work. Hint: <?php $hello = 'world'; echo "<?php echo $hello; ?>"; // Output: <?php echo world; ?> ?>
  20. I think asking about this on an english speaking forum will not get you the desired results. You may have better luck asking the same question on a french speaking/hosted forum
  21. So you want us to tell you how you can help your client fully utilize linkedin, a job for which you are paid, and we have to do it for you... I think not.
  22. Hello and welcome. For your question you'll probably need PHP (reading the image directory, selecting random images) and JS for all the dynamic stuff. Try it yourself and if you get stuck come back and post your code in the PHP section of if it's a JS question in the JS section.
  23. It could be blocked for several reasons though, most likely you are making too many requests. Put a decent sleep (1 second or more) amount after X requests.
×
×
  • 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.