0

The code works, but there is some error message and i want remove it line 29

file_get_contents(): Content-type not specified assuming application/x-www-form-urlencoded

EDIT - PHP:

<?php
$postdata = http_build_query(
array(
    'name'=>'test',
    'email'=>'test@gmail.com',
    'remail'=>'test@gmail.com',
    'password'=>'12341234',
    'repassword'=>'12341234',
    'phone'=>'12345678',
    'phonearea'=>'+1',
    'referral'=>'',
    'captcha'=>'',
    'fingerprint'=>'',
    'flashkey'=>'',
    'storagekey'=>''
));

$opts = array('http'=>
array(
    'proxy'=>"",
    'method'=>"POST",
    'header'=>"Referer: https://israel.tv/he/registration".
          "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:51.0) Gecko/20100101 Firefox/51.0",
    'content' => $postdata
));

$context  = stream_context_create($opts);
$result = file_get_contents('https://israel.tv/he/register', false, $context);
echo $result;
ben
  • 65
  • 2
  • 9
  • A GET request isn't supposed to have a body. Maybe you want a POST request? – Alexander O'Mara Jan 01 '18 at 22:59
  • @AlexanderO'Mara I managed to follow the code on the second link, thank you! But there is only one error message I'm trying to fix, I updated the post – ben Jan 02 '18 at 00:01
  • You need to add the `Content-type: application/x-www-form-urlencoded` header shown in the linked duplicate. – Alexander O'Mara Jan 02 '18 at 00:02
  • @AlexanderO'Mara Still appears, Content-type was before. I just deleted that line but it does not work out either – ben Jan 02 '18 at 00:07

0 Answers0