• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Prestashop cUrl Login

phpcurlprestashop


PHP Snippet 1:

$url = 'http://example.com/prestashop/login';
$fields = array(
   'submitLogin' => 1,
   'email' => '[email protected]',
   'passwd' => '123456',
);

$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, true);

curl_setopt($ch,CURLOPT_POSTFIELDS, $fields);

$result = curl_exec($ch);

curl_close($ch);

echo json_encode($result);

Related Snippets

How to get multiple values with same key from an array PHP

Add record for each array elements if missing in table

find in set in laravel ? example

How to install PHP composer inside a docker container

Can't exclude directories from .htaccess mobile redirect?

Filter WooCommerce related products by Polylang language

advanced custom fields wordpress custom class

enroll_table three field fetch to payment form to create payment field in laravel 5.5

How to pass security cloudflare server with php curl

Laravel with App Engine Standard Class 'FacadeIgnitionIgnitionServiceProvider' not found

Using Associative arrays

How to upload mpdf file after generating to s3 bucket in php

Split array into 4-element chunks then implode into strings

Two buttons one form

Use same method for inertia response and json response Laravel Jetstream

About Contact Privacy policy Terms and conditions