After getting authorizedRedirectUri what is the next process to get marketfeed through websocket curl php

$MARKET_URL = "https://api.upstox.com/v2/feed/market-data-feed/authorize";
$BEARER_TOKEN = [YOUR ACCESS TOKEN];


    $curl = curl_init();

    $headers = [
       'Accept: application/json',
       'Authorization: Bearer '.$BEARER_TOKEN
   ];
   
    $ch = curl_init();
   curl_setopt($ch, CURLOPT_URL, $MARKET_URL);
   curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    
   
    
    $response = curl_exec($ch);
   
    curl_close($curl);
   //  echo $response;
    $wsUrlResponse = $response;
    echo  $wsUrlResponse ;
 
    if ($wsUrlResponse === null) {
        echo "Error getting WebSocket URL\n";
        return;
    }

    $wsUrlData = json_decode($response, true);
    $wsUrl = $wsUrlData['data']['authorizedRedirectUri'];
    // echo  "authorizedRedirectUri     ".$wsUrl;
   // Initialize cURL for WebSocket connection
    $ch = curl_init($wsUrl);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Ignore SSL certificate verification
      // Send subscription message
      $subscriptionMessage = json_encode([
        "guid" => "someguid",
        "method" => "sub",
        "data" => [
            "mode" => "full",
            "instrumentKeys" => ["NSE_INDEX|Nifty Bank","NSE_INDEX|Nifty 50"]
        ]
    ]);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $subscriptionMessage);

    // Perform WebSocket handshake
    $response = curl_exec($ch);
    echo "response".$response;

  

    // Read messages from WebSocket
    while ($message = curl_exec($ch)) {
        echo "Received message: " . $message . "\n";
    }

    // Close cURL handle
    curl_close($ch);


I got authorizedRedirectUri from api response then how i can get websocket connection and data from authorizedRedirectUri (any sample code in curl php)

To ensure a seamless integration, we’ve provided a PHP SDK. You can access the SDK here and find details on market data functions here.

The SDK is also available in other languages, including Python, Java, and Node.js, which you can find here.

Give it a try n let me know if you face any issues.

Thanks for the response
I tried SDKs its working but my requirement to use data through API URL websocket connection in php(or in simple js functions) is there any sample code for that