Jump to content

el_nino

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Everything posted by el_nino

  1. I tried echo file_get_contents($url); as well as replacing $url with the actual url but i'm still not getting any results.
  2. the url is on another server, it currently looks like: http://www.comp.brad.ac.uk/intranet/modules/DWT/jfs/formats.html
  3. hey... I have a postgreSQL database which contains URL's to HTML documents. I want to output the contents of this document on a particular page on my site. so far i have tried 'file_get_contents', 'include' and 'fopen' but dont seem to be getting anywhere. The code i am using is <?php $sql="select * from jfs where issue = (select max(issue) from jfs) and format = 'html'";// selects the latest issue $result_set = pg_Exec ($conn, $sql); $rows = pg_NumRows($result_set); if ((!$result_set) || ($rows < 1)) { echo "<H1>ERROR - no rows returned</H1><P>"; exit; //exit the script } for ($j=0; $j < $rows; $j++) { $issue = pg_result($result_set, $j, "issue"); $page = pg_result($result_set, $j, "page"); $author = pg_result($result_set, $j, "author"); $title = pg_result($result_set, $j, "title"); $format = pg_result($result_set, $j, "format"); $url = pg_result($result_set, $j, "url"); //$url="http://google.co.uk/"; //$home=readfile($url); include ("$url"); //echo $home; } ?> <?php pg_FreeResult($result_set); pg_Close($conn); ?> i know that my query my working as i am able to echo the url but cannot display the contents of the file any help would be greatley appreciated el nino
×
×
  • 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.