Send headers to website using php, username and login data

Completado Publicado Dec 27, 2014 Pagado a la entrega
Completado 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);

?>

PHP Arquitectura de software

Nº del proyecto: #6911351

Sobre el proyecto

2 propuestas Proyecto remoto Activo Dec 27, 2014

Adjudicado a:

tomzu

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.

$20 USD en 1 día
(9 comentarios)
3.3

2 freelancers están ofertando un promedio de $23 por este trabajo

ssplancer

Dear Sir, I'm expert front end, PHP Open Source and wordpress developer with excellent analytic and technical skills. I have done a lot of projects for large organization with large data set for data mining and dat Más

$25 USD en 0 días
(34 comentarios)
5.1