Jump to content

mastubbs

Members
  • Posts

    52
  • Joined

  • Last visited

Everything posted by mastubbs

  1. Hi all, I've been trying to figure this out for a while now with no luck. I am setting up an online store and my supplier provides a RSS feed (online) to say which products are in stock. I am trying to have this feed populate a mySQL database by a chron job (or equivilent) say every hour or so. The database is actually a oscommerce database so that way i can keep the stock levels for my store up-to-date. Does anyone know how to make a script in php that can do this? Im sure it can be done. Thanks guys. Matt
  2. Hi all! This is my first post im (very) new to the world of php. I know a bit of HTML but i've been trying to fig out how to vary iframe content by URL. For example "http://mysite.com/page11.html?&iframe=page12.html" so that the iframe on page 11 would contain page 12. The script ive been using to get this to work is : <script type="text/javascript"> function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); } } } /* Credit: Original code from http://www.netlobo.com */ function gup( name ) { name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]"+name+"=([^&#]*)"; var regex = new RegExp( regexS ); var results = regex.exec( window.location.href ); if( results == null ) return ""; else return results[1]; } addLoadEvent(function() { var targetURL = gup("iframe"); document.all.myIframe.src=targetURL; }) </script> Problem is this script only seems to work in IE not FF. From what little i know about PHP it seems like this would be easy to do but i have no idea how. I read that you can make a php page containing <iframe src="<?php echo $_GET["iframe"]; ?> name="iframe" id="iframe" width="100%" height="320" scrolling="no" frameborder="0">fail</iframe> I tried this and put in the url : http://mydomain.com/page11.php?iframe=page12.php but didnt work can anyone help? Thanks in advance. Matt
×
×
  • 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.