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. Link to comment https://forums.phpfreaks.com/topic/281698-users-to-enter-url/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.