Send headers to website using php, username and login data
$10-30 USD
Pagado a la entrega
I want to send headers to a website using post method containing username and password the website a is secure https website. The method shall work on the following website [url removed, login to view] The code must be php code.
Username = Användarnamn (in swedish language)
Password = Lösenord (in swedish language)
You will not get the login data username and password but you can probably verify that the code is working in advance anyway i.e. if the username is fed correctly using post method it shall end up in the username field when the page grasped using file and then shown using echo.
The php code below is to show an example I have been using trying to figure this out but it does not work. Need your help to get this working. Thanks!
Please note that I need a solution that works 100% a general method like the one below does for some reason not work.
<?php
$data = array ('foo' => 'bar', 'bar' => 'baz');
$data = http_build_query($data);
$context_options = array (
'http' => array (
'method' => 'POST',
'header'=> "Content-type: application/x-www-form-urlencoded\r\n"
. "Content-Length: " . strlen($data) . "\r\n",
'content' => $data
)
);
$url="[url removed, login to view]";
$context = context_create_stream($context_options)
$data123=file_get_contents($url,false,$context);
?>
Nº del proyecto: #6911351
Sobre el proyecto
Adjudicado a:
I can fix that script or create you one, so you will be able to login. I'm experienced php developer and web scraper. Please contact me to discuss details.