I am trying to automate the registration on the Rkhel'a website for good purposes, but so far nothing has worked. Below is the code. What mistakes do I make? Thank you in advance.
PS In this category absolutely / generally / the beginner has no place to be worse.
<?php ini_set('display_errors',1); error_reporting(E_ALL); $agent = $_SERVER["HTTP_USER_AGENT"]; $url = "https://www.redhat.com/wapps/ugc/register.html?_flowId=register-flow&_flowExecutionKey=e1s1"; $postData = array("notificationCheksum"=>"", "timeZoneOffset"=>3, "userType"=>"B", "user.login"=>"NewUserSCUK223", "user.personalInfo.email"=>"carrrrrramba@extremail.ru", "password"=>"P@ssw0rd", "passwordConfirmation"=>"P@ssw0rd", "user.personalInfo.company"=>"MyCompani01", "user.personalInfo.title"=>"MyCompany01Title", "user.personalInfo.greeting"=>"Mr.", "user.personalInfo.firstName"=>"JohnUser01", "user.personalInfo.lastName"=>"BoltonUser01", "site.address.countryCode"=>"RU", "site.address.address1"=>"StFineh5", "site.address.address2"=>"", "site.address.address3"=>"", "site.address.postalCode"=>"", "site.address.city"=>"Moscow", "site.address.county"=>"", "site.address.state"=>"", "user.personalINfo.phoneNumber"=>89991235768, "user.personalINfo.faxNumber"=>"", "_user.contactPermissions.allowEmailContact"=>"on", "accepted"=>"true", "_accepted"=>"on", "redirect"=>"Submit", "_eventId_sumbit"=>"", "_flowExecutionKey"=>"e1s1"); $stringpostData = http_build_query($postData); $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'); curl_setopt ($ch, CURLOPT_REFERER, 'https://www.redhat.com/en'); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $stringpostData); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); $result=curl_exec($ch); curl_close($ch); ?>