Jump to content

Users to enter URL


cataiin

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.