Jump to content

subnet_rx

Members
  • Posts

    44
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

subnet_rx's Achievements

Member

Member (2/5)

0

Reputation

  1. I think I've determined this is a browser issue, but I wouldn't mind someone taking a look at the code to see if I'm doing things correctly <?php $menu_id=filter_input(INPUT_GET, 'q', FILTER_SANITIZE_NUMBER_INT); if (isset($menu_id)) { $url = "http://www.mysite.com/json/mobile_menu/".$menu_id; //load menu items $string=file_get_contents($url); $menu_object=json_decode($string); $m = $menu_object->nodes[0]; //load external links in menu $lurl = "http://www.mysite.com/json/external_links/".$menu_id; //load menu items $lstring=file_get_contents($lurl); $ext_object=json_decode($lstring); } else { header( 'Location: http://m.mysite.com/' ) ; } ?> <!DOCTYPE html> <html> <head> <title><?php print($m->menu->Menu_Title); ?></title> <?php require_once 'includes/header.inc.php'; ?> </head> <body> <div id="nid_menu" data-role="page"> <?php require_once 'includes/header_div.php'; ?> <div data-role="content"> <h1 class="menu_header"><?php print($m->menu->Menu_Title); ?></h1> <ul data-role="listview" data-dividertheme="a"> <?php if (isset($m->menu->Title)) { foreach($menu_object->nodes as $m) { if ($m->menu->Type == "mobile_menu") { echo '<li><a href="./menu.php?q='.$m->menu->Nid.'">'.$m->menu->Title.'</a></li>'; } else { echo '<li><a href="./page.php?q='.$m->menu->Nid.'">'.$m->menu->Title.'</a></li>'; } } } ?> <?php if (array_key_exists("nodes",get_object_vars($ext_object))) { ?> <li data-role="list-divider">Other Resources</li> <?php foreach($ext_object->nodes as $e) { echo '<li>'.$e->link->Link.'</li>'; }} ?> </ul> </div> <?php require_once 'includes/footer.php'; ?> </div> </body> </html>
  2. I have a page that processes a variable passed in the url to go get information out of a text file in JSON format. For some reason though, passing one variable loads a page, passing a certain variable (who's data in the file is virtually identical to the first) will cause the browser to just load the page indefinitely. Maybe even more strange is that on my local machine, the variable that won't load is switched, and the other loads fine. How can I debug what's happening when the page never loads so that I never get an error?
  3. This is not really a backup. I need a subset of information from a larger database. The larger database cannot be accessed remotely. So, I'm basically getting it to put out a xml feed of the subset of information (that is safe to be public) to then pull into my own local db. If there are other solutions given the restrictions, I'm up for other solutions because my current system is not going to perform very well for large datasets.
  4. Even if the database is limited to localhost access only, and your site is not on localhost?
  5. Well, not exactly, while the information is in a database, I don't want or need all of it. I'm simply pulling from it as a central source of data. I'm actually putting the data in a RSS feed, then importing into my application.
  6. I'm updating my database with a set of data from another database. When there is an item deleted from the source db, how would I make sure it's deleted from the db copy given that I have to run the update in a batch and can't run it when the item is deleted? Would I truncate the db at the beginning of each update, then pull all the of data over?
×
×
  • 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.