Jump to content


Staff Alumni
  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by CroNiX

  1. extract($str) is what you're looking for. Takes an array and breaks it up into individual variables using the keys of the array as the variable names. http://php.net/manual/en/function.extract.php
  2. What does the css for the class errorPrint look like, which are used in the spans after each input?
  3. You wouldn't want to change the date format that the array is storing. With mine, it's the same format ("datetime" from output of the array) that a mysql datetime column format is in (Y-m-d H:i:s), which allows you to do date calculations easily, like get me all the ones from the "last 30 minutes" or whatever. Instead, you'd want to format it when you loop over the php array and output the html.
  4. What doesn't work about it? Strange, it works here. Did you add the open/close php tags to the start/end of the script? Did you add the output that is from the very top of the 2nd code block to the very bottom of the script? When it does: $data = get_pb_data(); echo '<pre>'; print_r($data);
  5. I was playing with a similar approach that didn't use regex except to extract the GUID status. Barands is a bit cleaner. function get_pb_data() { $pb_data = array(); $base_url = ''; // Retrieve main page $base_page = file_get_contents($base_url); // Exit and show error if couldn't be retrieved if ( ! $base_page) { exit('Could not retrieve main page: ' . $base_page); } // These are substring items that will be removed from each line of text of the HTML $items_to_remove = array( "\r", // hidden return chars (if present) '<p> ', // <p>
  6. It's a Microsoft IIS webserver config file. Not positive about it, but seems to prevent listing a directory when going to it in your web browser.
  7. Its not going to be easy due to all of the malformed/improper HTML of those pages. You'd start by using either CURL, or file_get_contents() and retrieve that remote page. The rest gets trickier. Normally you could use some libraries to traverse the DOM tree of the retrieved page, but this page has no document declaration, no html section, no head section, no body section, etc. It's just a straight list of <p> tags. So not sure if any of the dom traversing libraries, such as simple_html_dom, will be able to parse it. So you might be needing to use regex to get the bits you want ou
  8. You send the request to the script that ajax would normally be submitting the login info to. It doesn't need to be an "ajax" request, unless they are specifically looking for the XMLHttpRequest header in which case you'd just need to add it to the CURL header to simulate an ajax request. Something like: curl_setopt($ch, CURLOPT_HTTPHEADER, array("X-Requested-With: XMLHttpRequest", "Content-Type: application/json; charset=utf-8"));
  9. Isn't what you are calling internal the same as private? Try calling a private method from outside the class.
  • 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.