PHP Classes

PHP Wikiloc: Validate Wikiloc URL pages and extract map IDs

Recommend this page to a friend!
  Info   View files Example   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-13 (12 hours ago) RSS 2.0 feedNot yet rated by the usersTotal: Not yet counted Not yet ranked
Version License PHP version Categories
wikiloc 1.0GNU General Publi...5PHP 5, Geography, Global
Description 

Author

This package can validate Wikiloc URL pages and extract map IDs.

It provides functions that can take URLs of the Wikiloc site as parameters.

The functions can:

- Validate if a URL is of a valid Wikiloc page

- Validate if a URL is of a valid Wikiloc trail page

- Validate if a URL is of a valid Wikiloc map page

- Extract the map identifier from a Wikiloc map page URL

Picture of Ali YILMAZ
  Performance   Level  
Innovation award
Innovation award
Nominee: 8x

 

Example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Wikiloc.php</title>
</head>
<body>
    <?php
   
   
require_once('src/wikiloc.php');
   
$trailPage = 'https://www.wikiloc.com/hiking-trails/cilingoz-cennet-selaleleri-05-08-2018-27286246';
    if(
isWikilocTrailValidation($trailPage)){
        echo
'<p>This is a wikiloc page.</p>';
    }
    echo
'<p>'.getWikilocTrailId($trailPage).'</p>';


   
$trailMapPage = 'https://www.wikiloc.com/wikiloc/embedv2.do?id=27286246&elevation=off&images=off&maptype=H';
    if(
isWikilocTrailMapValidation($trailMapPage)){
        echo
'<p>This is a Wikiloc map connection.</p>';
    } else {
        echo
'<p>This is not a Wikiloc map connection.</p>';
    }
        echo
'<p>'.getWikilocTrailMapId($trailMapPage).'</p>';
   
?>

</body>
</html>


  Files folder image Files  
File Role Description
Files folder imagesrc (2 files)
Accessible without login Plain text file example.html Example Example page
Accessible without login Plain text file example.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text

 Version Control Unique User Downloads  
 100%
Total:0
This week:0