Hey everybody,
I'm trying to get the source of a file using php and the file_get_contents function. The problem is that the website requires a login. I thought that this could be bypassed by logging into the site first and then use the file_get_contents function but this is not the case. The page that the function returns is the login page.
This is the code:
<?php
if (isset($_GET['getroster'])){
$file = stripslashes(file_get_contents('https://intranet.hlf.de/custom/cddTUB.asp?show=1'));
print ($file);
}
?>
As you can see when running this function, or when going to the url, it requests a username, password and company from a dropdown list.
Is it possible to pass these values to the page by using this or any other php function. Or maybe doing it in a totally different way? Any help would be appreciated!
Regards Ron