Awesome File Trick
I was just reading PHP and got a awesome function named file_get_contents() it returns the whole file as a string.But the special thing is it can read web sites too 🙂 .For example here is a code
$data = @file_get_contents(‘http://www.google.com’);
$file = fopen(‘google.txt’,’w’);
First line will get the contents of http://www.google.com
Then it’ll show the data
And then it’ll save into a file named google.txt.
U can use it when u need some data from another site and if that site dont use the rss .
Note : Special thanks to Hasin Bhai he told me about this function a few days ago but i just forgot 😦 .