Now I have a script that reads text from another page and shows a part of it in mine. Like this:
$fd = fopen ("http://www.mol.fi/Tietoa/Ammatti/00/3/0/1/30110.html", "r");
while (!feof ($fd)) {
$html .= fread($fd, 4096);
preg_match('#<a name="työtehtävät">(.*)<a name="kelpoisuusehdot">#is', $html, $match);
echo $match[1];
}
Now I would like the url to be defined by checking which link the user has chosen. There are going to be many different urls, and I would like to use this same code despite of which link is clicked. Is it possible anyhow to define for example variables to all the urls and replace the url in the script above with that variable?
If anybody understands what I mean, please try if you can help, thanks.