enter modem with cURL

1

I found some examples of login with cURL and I am using this ...

<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'http://myhost/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);

$output = curl_exec($ch);

if($output === FALSE){
echo 'cURLL Error:'.curl_error($ch);
}

curl_close($ch);

print_r($output);



?>

when you run it, it only prints a "1" and nothing else ...

What I'm trying is to enter a GSM modem that I have ... any advice?

thanks!

    
asked by Alf 15.11.2017 в 19:07
source

1 answer

0

I recommend you login (digest login) with the tools for active Google Chrome developers, so you can view the headers (through the NetWork tab) to try to replicate them via Curl.

    
answered by 15.11.2017 / 21:43
source