Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Bacherino's avatar

How can i send a post request to api with my shared hosting's ip

Here's my code block.

It's sending the request and when i check the response i saw the ip is my pc's external ip.

I must send it from my shared hosting.

public function testing(){
        $response = Http::acceptJson()
        ->withHeaders(['Authorization' => 'Bearer Token'])
        ->post('ip',[
            'user'=> 'user',
            'pass'=> 'pass!'
        ]);
        return dd($response);
    }
0 likes
4 replies
Bacherino's avatar

@MohamedTammam @sinnbeck I meant the api.

There's a firewall on the external domain and my hosting's ip has been setted up in it.

So how can i get the api with my computer by shared hosting.

I'm guessing i should check the api before the implementing api.

Please or to participate in this conversation.