Jump to content

input/output stream


nasi
 Share

Recommended Posts

I am going to read the content of a url, do some changes and again publish it. I have used the following code just to test how to read and write streams but it doesn't work.<html><head><script language="JavaScript">function readfile (){ inputstream = readfile("http://www.somesite.com"); file_put_contents("php://output", inputstream);}</script></head><body onload="readfile ()"></body></html>any suggestion?

Link to comment
Share on other sites

file_put_contents() and readfile() are php function which you cant use like this. php codes only be executed in <?php ?> block and you have to install the server also.http://w3schools.com/php/php_intro.asp

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...