There is one cop.php file in which links should be listed. And there is another file in which the file is called cop.php.

file_get_contents( "/cop.php?=tof" ) 

How can I list the links in the cop.php file so that they can be called through parameters that I set up myself. Somewhere you need to call tof, somewhere tob, etc.

What should be the file cop.php?

  • > so that they can be called And they do not respond to the nicknames? - Artem
  • And how many of these links - which you need to call the parameters? - Aios
  • one per parameter. - bande

1 answer 1

Purely supposed

 <?php $urls = array( "top" => "http://example.ru/1", "tof" => "http://example.ru/2", "tod" => "http://example.ru/3" ); if ($_GET['url']) die($urls[$_GET['url']]); ?> 

but then the call should work approximately like file_get_contents ("/ cop.php? url = top"); Nobody says that this is a very kosher decision .. I just help you to follow in the footsteps of which you are already walking

  • and if the link of a type <a href="//link"> ankor </a>, or here without a difference? - bande
  • thanks, Aios - bande