Posts

Showing posts from October, 2020

LARAVEL MY CUSTOM FILE

OCTOBER 2 2020 CREATE A NEW LARAVEL PROJECT     1: E:     2: cd xamp\htdocs     3: composer create-project --prefer-dist laravel/laravel test FOR COMPLETE FRAMWORK DOWNLOAD OF LARAVEL     composer create-project laravel/laravel test dev-develop START LARAVEL PROJECT     go tp the folder project folder     E:xamp>htdocs>laravel>Blogger (Blogger is project name)(in cmd)     php artisan serve(starts the laravel framework by default on localhost:8000) BASIC URL WILL BE     http://localhost/PROJECT NAME/public/       REMOVE THE PUBLIC FROM URL     1- Go to public folder copy htaccess file and past it in root directory(root folder)     2- then in root of file find server.php copy and paste the file and change the copied filename into index.php   LARAVEL ASSETS     composer require laravel/ui     PRESS ENTER     php artisan ui ...

CURL CODE WITH VALID CURL

 CURL.PHP <?php   //for http_build_query $data = http_build_query(array( "email" => 'Qasim',  "password" => "razaqasim" ));     var_dump($data);     $url = 'http://localhost:8080/php/practice/data.php'; $ch = curl_init(); //set the url, number of POST vars, POST data curl_setopt($ch,CURLOPT_URL, $url); // curl_setopt($ch, CURLOPT_HEADER, 0);   curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);  curl_setopt($ch, CURLOPT_POST, 1);     curl_setopt($ch, CURLOPT_POSTFIELDS,$data);      // curl_setopt($ch, CURLOPT_HTTPHEADER, $request_headers); //execute post $result = curl_exec($ch); curl_close($ch);     var_dump($result);     exit;  //for json_encode $data = json_encode(array( "email" => 'Qasim',  "password" => "razaqasim" ));     var_dump($data);     $request_headers = array(         'Conten...