PHP cURL In general, we use cURL to communicate with API endpoints. Using cURL might not be the most pretty approach, but it definitely does the job. See the example below: // Method: POST, PUT, GET etc // Data: array(“param” => “value”)...
You can verify downloaded file using PGP signature. Alternatively use SHA256 key verification. So how does it work? First of all you need to download two files the file.zip and file.zip.asc. Lets take a look on example when downloading phpMyAdmin package (see...
Create the project directory and get the most recent version of WordPress PROJECT=”somesitedomaincom” # you can replace all occurrences of “~/Sites” with ${BASEPATH} BASEPATH=”some/path/to/dir” # Setup site folder, replace all...
Quick preview – Develop PHP with standards. Fallow this rules to ensure your code is legit and well formed. Keep up with those principle and you will become a better programer. KISS – “Keep It Simple, Stupid” The simpler your code is, the...
Regular expression types This is what confuses a lot of people. People tend to think that there is one engine for regex in PHP. However there are 2 types of regular expressions: POSIX ExtendedPerl Compatible (PCRE)...