mobile friendly check using google api

23 Apr Mobile friendly check using Google PageSpeed Insights API with PHP

[php] function get_curl_response($url){ $ch = curl_init(); $timeout = 60; curl_setopt($ch, CURLOPT_URL, $api_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $result = curl_exec($ch);...

Read More

21 Apr Create a Basic Web Service Using PHP, MySQL, XML, and JSON

Below is a very basic web service using PHP and MySQL. The output of this web service is either XML or JSON. In the web service, I'm trying to get a list of all active users from the database. [php] //connect to the db $conn = mysql_connect("localhost","username","password") or die("Cannot...

Read More