• 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

Class AppHttpControllersUserController Does Not Exist

Use same method for inertia response and json response Laravel Jetstream

Warning file_get_contents () failed to open stream: HTTP request failed! HTTP/1.0 402 Payment Required

Get orders by date and status woocommerce

Confirm Leave on External Links in Wordpress

How to get page number on dompdf PDF when using "view"

Insert And Retrieve Data in MySQL with $.post Noob Question

Symfony run hint kernel.secret parameter not found

Laravel - Implicit route model binding with soft deleted data

How to set time with DateTime modify?

Why the name of trucks are same in 2nd and 3rd record of company data retrieval?

zsh: command not found: php

Prestashop webservice API creating cart rules

codeigniter 4 running error first time with xampp

Unsure why I am getting: Number of variables doesn't match number of parameters in prepared statement

About Contact Privacy policy Terms and conditions