How to Add Pinterest Share Button in PHP Website?
Hello Friends,
This extensive guide will teach you php pinterest share post button. If you have a question about pinterest share button php then I will give a simple example with a solution. If you have a question about custom pinterest share button php then I will give a simple example with a solution. If you have a question about create custom pinterest share button php then I will give a simple example with a solution. Here, Create a basic example of how to make pinterest share button in php website.
In this post, I will show you how to make a pinterest share button in php code. we will create a simple "index.php" file and add a pinterest share button. When the user clicks on that button then it opens a pinterest page and shares your given URL. so, let's see the simple example with output:
index.php
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>How to Add pinterest Share Button in PHP - ItSolutionStuff.Com</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
</head>
<body>
<div class="container">
<h2>How to Add Pinterest Share Button in PHP - ItSolutionStuff.Com</h2>
<?php
$url = "https://www.itsolutionstuff.com/post/whats-new-in-laravel-11-new-features-and-latest-updatesexample.html";
$image = "https://www.itsolutionstuff.com/upload/itsolutionstuff.png";
$title = "This is demo";
?>
<a href="javascript:window.open('http://pinterest.com/pin/create/link/?url=
<?php echo $url ?>&media=<?php echo $image ?>&description=<?php echo $title ?>', '_blank', 'width=400,height=500');void(0);" class="btn btn-danger">Share on Pinterest</a>
</div>
</body>
</html>
Output:
I hope it can help you...
Hardik Savani
I'm a full-stack developer, entrepreneur and owner of ItSolutionstuff.com. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Laravel, Angular, Vue, Node, Javascript, JQuery, Codeigniter and Bootstrap from the early stage. I believe in Hardworking and Consistency.
We are Recommending you
- How to Add Facebook Share Button in PHP Website?
- PHP Format Number with 2 Decimals Example
- How to Get Time Difference in Hours and Minutes in PHP?
- How to Convert Array to JSON in PHP?
- PHP MySQL Column Sorting Example Tutorial
- PHP MongoDB CRUD Operation Example
- PHP MySQL Login with Google Account Example
- PHP Ajax Multiple Image Upload with Preview Example
- PHP - Dynamically Add Remove input fields using JQuery Ajax Example with Demo
- How to Upload and Resize Image in PHP?
- PHP MySQL DataTables Server-side Processing Example
- PHP MySQL Integrate Fullcalendar Example Tutorial
- PHP MySQL Highcharts Chart Example