At 04:22 11.03.2003, Anthony Ritter said:
[snip]
I'm trying to test the following script to display the contents of the
following URL but it will not output.
Any advice will be greatly appreciated.
Thank you.
Tony Ritter
Hugh,
That script works fine.
Thank you.
What I am trying to achieve is to pull a .jpeg from a remote URL and then
resize and/or crop it after it is placed in a variable.
Your script is able to open and read the original file for output.
In the following script, I have the variable $contents
I've never opened a URL with fopen.
Have you looked for examples in the manual? http://php.net/fopen ???
however, I can see one problem...
filesize($file) -- where is $file
Justin French
on 11/03/03 2:22 PM, Anthony Ritter ([EMAIL PROTECTED])
wrote:
I'm trying to test the following
I'm trying to test the following script to display the contents of the
following URL but it will not output.
Any advice will be greatly appreciated.
Thank you.
Tony Ritter
...
html
head
/head
body
?
$file_handler =
Anthony,
Try:
$file_to_open=http://www.weather.com;;
$fp=fopen($file_to_open,r);
$contents=fread($fp,1); //reads to eof or ~10K whichever comes first
print $contents;
Hope this helps.
Hugh
- Original Message -
From: Anthony Ritter [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
Anthony,
Oh, I forgot to close the file, and it's an important step!
fclose($fp);
Hugh
- Original Message -
From: Anthony Ritter [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 10, 2003 7:22 PM
Subject: [PHP] newbie: contents will not output
I'm trying to test the
6 matches
Mail list logo