Jump to content

TheHamburgler

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by TheHamburgler

  1. Sooooopa,that will work, thanks
  2. Hi,I'm designing a horizontal scrolling website. There are nurmerous hotspot links that will scroll the user along the page to each section.Is it possible to make these links scroll smoothly to the desired hot link rather than just jumping to that point in the page?hope thats clear
  3. Hi,Just a quick one here. $result = mysql_query(" SELECT * FROM table ORDER BY Rand() LIMIT 1");$row = mysql_fetch_array($result) From my understanding the following code will select a random row from the table, fetch that row and store it in an array.How can I take one value (column) from this array and store it as a string variable that will be available to the whole script?ta
  4. Great! thanks a lot, I'd just found a work around by sticking the array value into another variable, $img = $row[image]; and using that but you're solution is a lot cleaner.
  5. Hi,Great answers, I'm also having a problem with displaying images in PHP.I'm holding image names in a table and selecting one at random to be displayed. I can construct and display a string of the image location combining the base image directory and image name. When i try and insert this into the <img scr"" /> i get nothing I'm pretty new to php and probably doing something stupid but it's driving me nuts! // Define the base image dir$base_img_dir = "images/";// Select a random row from table$sql = "SELECT image FROM votes ORDER BY Rand() LIMIT 1";// Pass random row to variable$result = mysql_query($sql) or die (mysql_error());//while ($row = mysql_fetch_array($result)){// This image, directly linked displays okecho '<img src="images/Image.jpg" />';// This line displays the image path ok eg. "images/Image.jpg"echo $base_img_dir."{$row[image]}";// But when I combine the two I just get the image place holder! It cant seem to locate the imageecho '<img src=" $base_img_dir . "{$row[image]}" " />';}
  6. Cool, I took a look.One problem though, it's for an Apple Widget which will just run on a users dashboard. Is there away way to achieve it without needing access to a php server?Currently I dont have one set up, I was hoping to achieve this through a standalone script run from the browser :)Each person who uses it will be directed to the same url http://www.lovefilm.com/account/selection.html but each will have different product_id's on their page.Even if i were to scrape the page to a php server each request would be different depending on the person using the widget...
  7. Thanks for you're help, that's what i'm trying to do. I do not have access to the server, its a 3rd party site, can I still return the html file to a variable? The page is public and only depends on the user having a cookie to remember their account details.
  8. Yeah I know, I'm looking for that string within the html file. It's not part of the html code but will be enclose in the <a></a> tags on the page.It's for a dashboard widget I'm trying to develop that will look to a DVD rental website and tell me what DVDs I have on rent or being delivered.Here's a snippet of the html<a href="/product/detail.html?product_id=xxxx" title="West Wing, The - Complete Season 1 - Disc 4">West Wing, The - Complete Season 1... Disc 4</a>Once I'm able to return the product_id=xxxx I can find the get the url of the DVD image to present in the widget.It's getting a bit tricky though so it will probably hit the rubbish bin in a few more weeks
  9. Hi,How would i go about searching a webpage for a defined tag/word and the text after it?I have looked into a number of methods like getElementById and getElementsByName but they dont do what i need.I need to point the script to a page on the web, eg www.thispage.com/thisone.html Then I want to search the html for all instances of the word product_id="xxxx" and then return each product id (5 digit code) as a seperate string of numbers.Thanks
  10. Thanks for you're help, I've hurd of screen scraping before but hoped there would be a more compact solution with javascript.Anywho now i've got a lead i can look into it further
  11. Hi,I'm not looking for a full solution here, but a few prods in the right direction would be appreciated.I need to code a simple webpage that will connect to an external website and grab the link to an image. The linked picture will change in time but the html format will not. It's for an Apple widget im working on that will connect to my account on a film rental website and display the DVD covers i request.I'm a bit lost as what to use Javascript, XML, Ajax or a compination of all of them. Thanks for you're time Burgler Out.
×
×
  • Create New...