• 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 convert the int value to inch in PHP [closed]

How to change 'users' auth table and use another instead Laravel

Require a class from another class - php

Fatal error: Uncaught mysqli_sql_exception: Unknown database 'test' in ... (How do I fix that? Using PHP)

phpunit - testing is painfully slow

Converting IPv6 to IPv4 address in PHP

Send POST data via raw JSON with Postman

Navigation idle on content download

How to set dynamic `home` and `siteurl` in WordPress?

Display the default discounted price and percentage on Woocommerce products

Warning: A non-numeric value encountered

Laravel multi auth - Authentication user provider [] is not defined

I want to store data in new index as per my key in php [duplicate]

dompdf and img tag, image wont show

PHPExcel How to set conditional formatting to change cell background color based on cells values

About Contact Privacy policy Terms and conditions