Search
 
SCRIPT & CODE EXAMPLE
 

PHP

fetch data from live website curl php

// Initialize Curl 
 $curl = curl_init();
 curl_setopt($curl, CURLOPT_URL, "https://coinmarketcap.com/"); // set live website where data from
 curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE); // default
 curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); // default
 $content = curl_exec($curl);

 preg_match_all('!<p color="text3" class="sc-AxhUy bzeXdk coin-item-symbol" font-size="1">(.*?)</p>!', $content, $matches);

 var_dump($matches);
Comment

PREVIOUS NEXT
Code Example
Php :: show float laravel blade 
Php :: php add item to array 
Php :: live update mysql data in php 
Php :: nova laravel image 
Php :: php count matching words in two strings 
Php :: cannot use font awesome in php mvc 
Php :: convert to json php 
Php :: how to create controller inside folder in laravel 
Php :: how to remove Website field from comments 
Php :: php array extract value 
Php :: What does "as" keyword mean in Laravel route ? 
Php :: get current month php 
Php :: upload a pdf file laravel 
Php :: laravel throw function 
Php :: The configuration file now needs a secret passphrase (blowfish_secret). 
Php :: php unique id 
Php :: sum row data and get all data eloquent laravel 
Php :: how make custom menu in wordpress 
Php :: full month name php 
Php :: laravel faker seeder 
Php :: wordpress php cpt get all taxonomy 
Php :: how to create migration in laravel 
Php :: wordpress get order 
Php :: laravel execute command from terminal 
Php :: title tag wordpress 
Php :: check method in laravel 
Php :: php read text file into array 
Php :: get day from date php 
Php :: how to remove keys in subarray php 
Php :: how to remove annoying plugin notification in wordpress 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =