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

keroherox20's avatar

Help Create Curl API To Laravel

i want to add this api so how to adding on laravel controller and get id order and services id and price so want adding laravel controller and form in blade and get result

can any one help me please

This is Api Doc :

PHP LINK FOR INSTANT REPLY:

https://alpha.imeicheck.com/api/php-api/create?key=API_KEY&service=SERVICE_ID&imei=IMEI/SN

-Replace "API_KEY" with your API key.

-Replace "SERVICE_ID" with the service id you find in PHP LIST. (For example for Find my iPhone - id is 1.)

-Replace "IMEI / SN" with your IMEI or Serial.

For the value "status" can be:

-> "success" - the order status is successful.

-> "failed" - the status of the order is fail / rejected

-> "error" - used for system validation errors, such as: " Invalid ApiKey " / " Wrong IP " or " Credit Error ". These answers are preferably not displayed to clients.

PHP LINK FOR ORDER ID HISTORY:

https://alpha.imeicheck.com/api/php-api/history?key=API_KEY&orderId=ORDER_ID

-Replace "API_KEY" with your API key.

-Replace "ORDER_ID" with order id.

PHP LINK FOR ACCOUNT BALANCE:

https://alpha.imeicheck.com/api/php-api/balance?key=API_KEY

-Replace "API_KEY" with your API key.

Note: If there are orders in process, the credit will be deducted from the user balance (and that credit will be returned in case the order is rejected).

i try to create laravel but i still not know what can do ?

public function imeiSubmit(Request $request)
{
     $request->validate([
            'services_id'=>'required',
            'imei'=>'required',
        ]);

    $api_key = 'AXJwka-pKEL9-1Dtnc-iLn67-NWF77-cqkhT';
    $services_id = '';
    $imei = $request->imei;
    
    $url = "https://alpha.imeicheck.com/api/php-api/create?key=$api_key&service=$services_id&imei=$imei";
    
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_URL, $url);
     curl_setopt($ch, CURLOPT_POST, 0);
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

     $response = curl_exec ($ch);
     $err = curl_error($ch);  //if you need
     curl_close ($ch);
     return $response;
}

HTML Form

<form method="POST" action="" style="margin-top:5%">
		<p><input type="text" style="padding: 15px 10px 10px; font-family: 'Source Sans Pro',arial,sans-serif; border: 1px solid #cecece; color: black;box-sizing: border-box; width: 50%; max-width: 500px;" name="imei" autocomplete="off" maxlength="50" placeholder="Write here IMEI or SN"></p>
		<select name="service" id="service" style="padding: 15px 10px 10px; font-family: 'Source Sans Pro',arial,sans-serif; border: 1px solid #cecece; color: black;box-sizing: border-box; width: 50%; max-width: 500px;">
			<option value="0" selected="selected">PLEASE CHOOSE CHECKER</option>
			<optgroup label="iPHONE SERVICES">
				<option value="0.01">Find My iPhone [ FMI ] (ON/OFF) &#x26A1;</option>
			</optgroup>
		</select>
		<br /><br />
		<button type="submit" style="background-color: #2ABCA7; padding: 12px 45px; -ms-border-radius: 5px; -o-border-radius: 5px; border-radius: 5px; border: 1px solid #2ABCA7;-webkit-transition: .5s; transition: .5s; display: inline-block; cursor: pointer; width: 20%; max-width: 200px; color: #fff;">Submit</button>
	</form>

Want Someone help me to continue and get result from form in html and Thanks :)

0 likes
1 reply

Please or to participate in this conversation.