-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
514 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<<<<< cURL PHP >>>> | ||
|
||
|
||
-------------------------------------------------------- | ||
-------------------------------------------------------- | ||
Keys: cURL, | ||
|
||
-------------------------------------------------------- | ||
-------------------------------------------------------- | ||
//Freasers | ||
//PHP With code: PHP Important projects Suggestion | ||
https://www.interviewbit.com/blog/php-projects/ | ||
|
||
-------------------------------------------------------- | ||
-------------------------------------------------------- | ||
|
||
-------------------------------------------------------- | ||
-------------------------------------------------------- | ||
|
||
//Simple CMDS: | ||
https://youtu.be/8HvPeinS8HU?t=1164 | ||
|
||
curl www.google.com | ||
curl -o example.html www.example.com | ||
D:\> curl -o google.html https://www.google.com | ||
curl -O www.example.com/example.html | ||
curl -OL www.example.com/example.html | ||
curl https://securities.com/login.html | ||
--------------------------------------------------------- | ||
|
||
|
||
cURL PHP : | ||
|
||
|
||
//Step 1 To initialize curl | ||
$ch = curl_init(); | ||
//Step 2 To set url where you want to post | ||
$url = ‘http://www.localhost.com’; | ||
//Step 3 Set curl functions which are needs to you | ||
curl_setopt($ch,CURLOPT_URL,$url); | ||
curl_setopt($ch,CURLOPT_POST,true); | ||
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); | ||
curl_setopt($ch,CURLOPT_POSTFIELD,’postv1 = value1&postv2 = value2’); | ||
//Step 4 To execute the curl | ||
$result = curl_exec($ch); | ||
//Step 5 Close curl | ||
curl_close($ch); | ||
|
||
|
||
|
||
|
||
|
||
|
||
-------------------------------------------------------- |
Oops, something went wrong.