1 year ago

#331199

test-img

M_Arad

Http Request being blocked by the Hosting provider?

I have a simple Php server which is expecting the simple http get request and then Respond with some encrypted data The http web request is made by a small application which uses wininet.dll to make the web request.

when I make the same request using a browser , everything works fine and intended data is echoed from the server , however when I make the request from the application , it gets blocked by the hosting provider.

this is my PHP server :

<?php
$entityBody = htmlspecialchars($_GET["name"]);


$rest = substr($entityBody, 0, 2);
    
$str2 = substr($entityBody, 2); 

$vval= file_get_contents("Private/$str2");

$cipher     = 'AES-256-ECB';
$key        = 'FFv3mgc21VgTcaFDOPzgl5hZsY74TcTh';
$plaintext  = $vval;

if (strlen($plaintext) % 16) {
    $plaintext = str_pad($plaintext, strlen($plaintext) + 16 - strlen($plaintext) % 16, "\0");
}
$chiperRaw  = openssl_encrypt($plaintext, $cipher, $key, OPENSSL_NO_PADDING);
$ciphertext = trim(base64_encode($chiperRaw));

$ciphertext = $rest.$ciphertext;
 
echo($ciphertext);
?>

and this is the response I get when I make the request using the Application:

enter image description here

what could cause this issue ?

php

http

https

webserver

httpwebrequest

0 Answers

Your Answer

Accepted video resources