cataiin Posted August 30, 2013 Share Posted August 30, 2013 I have this code: <?php $url = "http://www.example.com/"; $page = fopen($url, 'r'); $content = ""; while( !feof( $page ) ) { $buffer = trim( fgets( $page, 4096 ) ); $content .= $buffer; } $start = "<text1>"; $end = "<\/text2>"; preg_match( "/$start(.*)$end/s", $content, $match); $mytext = $match[1]; echo "$mytext"; ?> Now, I need a way for users to enter $url. I've tried with $_GET and to get current url (something like index.php?url=$url) but unsuccessful. 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.