-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShareContent.class.php
More file actions
47 lines (39 loc) · 1.32 KB
/
ShareContent.class.php
File metadata and controls
47 lines (39 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
// Author: Amir Sasani
// Title: Share Content
// Description: Share web contents in web
class ShareContent{
public static function facebook($url)
{
return "https://www.facebook.com/sharer/sharer.php?u=". $url;
}
public static function twitter($tweet)
{
return "https://twitter.com/home?status=". $tweet;
}
public static function googlePlus($url)
{
return "https://plus.google.com/share?url=". $url;
}
public static function linkedIn($url, $title, $summary = "", $source = "")
{
return "https://www.linkedin.com/shareArticle?mini=true&url=". $url ."&title=". $title ."&summary=". $summary ."&source=". $source;
}
public static function pinterest($image, $imageSource, $description)
{
return "https://pinterest.com/pin/create/button/?url=". $imageSource ."&media=". $image ."&description=". $description;
}
public static function whatsapp($text)
{
return "whatsapp://send?text=". $text;
}
public static function telegram($url)
{
return "https://telegram.me/share/url?url=". $url;
}
public static function email($recipient = "", $subject, $body)
{
return "mailto:". $recipient ."?&subject=". $subject ."&body=". $body;
}
}
?>