Snippet Name: Read a web page directly in to a string Description: A slick and easy way of reading a remote file or web page directly in to a string. Also see:» SEO string generator » Write or update an htpasswd file i... » Match all #RRGGBB or #RGB values i... » Active Directory - Reading the Use... » Validate file extensions in upload... » Javascript Include - allows dynami... » Remove empty lines from a string o... » Automatically find location of jav... » Find first non-numeric character i... » Remove empty lines from text files » Analyze a remote image with PHP » Delete a file in Visual Basic » Copy a file in VB » Reading and Writing to text files ... » Parsing PHP in Javascript Files » Multi-line variables and strings i... » Perl version of file_get_contents&... » Convert a String to Title Case in ... » Count all words in a string » Count specific characters in a str... » Read the contents of an entire fil... » Create an array from the lines of ... » Create an array from comma separat... » Remove Duplicate Lines from a File » Extract Just The BODY Of An HTML F... » Rename Files Interactively » Convert Unix time string to a date... » Sort A File List By Month Name In ... » Get File Size Over HTTP Comment: (none) Author: Language: PHP Highlight Mode: PHP Last Modified: December 20th, 2010
Description: A slick and easy way of reading a remote file or web page directly in to a string.
Also see:» SEO string generator » Write or update an htpasswd file i... » Match all #RRGGBB or #RGB values i... » Active Directory - Reading the Use... » Validate file extensions in upload... » Javascript Include - allows dynami... » Remove empty lines from a string o... » Automatically find location of jav... » Find first non-numeric character i... » Remove empty lines from text files » Analyze a remote image with PHP » Delete a file in Visual Basic » Copy a file in VB » Reading and Writing to text files ... » Parsing PHP in Javascript Files » Multi-line variables and strings i... » Perl version of file_get_contents&... » Convert a String to Title Case in ... » Count all words in a string » Count specific characters in a str... » Read the contents of an entire fil... » Create an array from the lines of ... » Create an array from comma separat... » Remove Duplicate Lines from a File » Extract Just The BODY Of An HTML F... » Rename Files Interactively » Convert Unix time string to a date... » Sort A File List By Month Name In ... » Get File Size Over HTTP
$data = file_get_contents('http://domain.com/file.txt');