EagerWolf Posted November 25, 2007 Share Posted November 25, 2007 I want to store data from one webpage and store data in MySQL... I want to run script on my server once a day with crontab... Any suggestions? Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 25, 2007 Share Posted November 25, 2007 so then do it? I do'nt see the issue if you know your plan file_get_contents will help you probably Quote Link to comment Share on other sites More sharing options...
EagerWolf Posted November 25, 2007 Author Share Posted November 25, 2007 The problem is I don't know how to download content... Example URL: http://example.com/index.php?content=412091248921958912 Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 25, 2007 Share Posted November 25, 2007 file_get_contents Quote Link to comment Share on other sites More sharing options...
phpSensei Posted November 25, 2007 Share Posted November 25, 2007 file_get_contents(path,include_path,context,start,max_length) <?php echo file_get_contents("test.txt"); ?> The output of the code above will be: This is a test file with test text. Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted November 25, 2007 Share Posted November 25, 2007 The output of the code above will be: This is a test file with test text. Only if you happen to have a file named test.txt with the text 'This is a test file with test text.' in the same folder as the php script. Personally, i dont Quote Link to comment Share on other sites More sharing options...
phpSensei Posted November 25, 2007 Share Posted November 25, 2007 The output of the code above will be: This is a test file with test text. Only if you happen to have a file named test.txt with the text 'This is a test file with test text.' in the same folder as the php script. Personally, i dont Oops, I sort of misunderstood him lol. Your right. file_get_contents("http://www.site.com/index.html"); Quote Link to comment Share on other sites More sharing options...
EagerWolf Posted November 28, 2007 Author Share Posted November 28, 2007 I thought it is only for files! Thank you very much guys! Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 28, 2007 Share Posted November 28, 2007 well technically it is and technically it is getting the output from that url as a xhtml document. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.