下拉刷新
PHP 项目
分类

这里是按照「分类」阅读往期的 HelloGitHub 月刊内容, 您目前在查看 HelloGitHub PHP 项目 集合。

1
dompdf
Star 1w
Fork 1.8k

一个 HTML 转 PDF 的 PHP 库。示例代码:

// reference the Dompdf namespace use Dompdf\Dompdf; // instantiate and use the dompdf class $dompdf = new Dompdf(); $dompdf->loadHtml('hello world'); // (Optional) Setup the paper size and orientation $dompdf->setPaper('A4', 'landscape'); // Render the HTML as PDF $dompdf->render(); // Output the generated PDF to Browser $dompdf->stream();
Star 2.1w
Fork 9.7k

应该是最流行的 PHP 发邮件的开源库。很多知名 PHP 开源项目中都有它的身影,比如:WordPress、Yii 等,支持你对发邮件的所有开发需求。看看示例代码,就知道使用起来有多简单啦:

<?php //Import PHPMailer classes into the global namespace //These must be at the top of your script, not inside a function use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\SMTP; use PHPMailer\PHPMailer\Exception; //Load Composer's autoloader require 'vendor/autoload.php'; //Instantiation and passing `true` enables exceptions $mail = new PHPMailer(true); try { //Server settings $mail->SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output $mail->isSMTP(); //Send using SMTP $mail->Host = 'smtp.example.com'; //Set the SMTP server to send through $mail->SMTPAuth = true; //Enable SMTP authentication $mail->Username = 'user@example.com'; //SMTP username $mail->Password = 'secret'; //SMTP password $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; //Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged $mail->Port = 587; //TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above //Recipients $mail->setFrom('from@example.com', 'Mailer'); $mail->addAddress('joe@example.net', 'Joe User'); //Add a recipient $mail->addAddress('ellen@example.com'); //Name is optional $mail->addReplyTo('info@example.com', 'Information'); $mail->addCC('cc@example.com'); $mail->addBCC('bcc@example.com'); //Attachments $mail->addAttachment('/var/tmp/file.tar.gz'); //Add attachments $mail->addAttachment('/tmp/image.jpg', 'new.jpg'); //Optional name //Content $mail->isHTML(true); //Set email format to HTML $mail->Subject = 'Here is the subject'; $mail->Body = 'This is the HTML message body <b>in bold!</b>'; $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; $mail->send(); echo 'Message has been sent'; } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; }
Star 2.3k
Fork 580

视频去水印工具。原理很简单就是根据输入的视频的地址,返回原平台无水印的视频源地址。目前支持 15 个视频平台,在线尝试

video_spider
Star 1.8k
Fork 363

一个类 Jira 的开源问题需求跟踪平台。前端基于 React+Redux 后端采用 PHP 的 Laravel 框架实现

actionview
Star 3.1k
Fork 535

短信发送 PHP 组件。特点:

  • 支持目前市面多家服务商
  • 一套写法兼容所有平台
  • 简单配置即可灵活增减服务商
  • 内置多种服务商轮询策略、支持自定义轮询策略
  • 等等
use Overtrue\EasySms\EasySms; $config = [ // HTTP 请求的超时时间(秒) 'timeout' => 5.0, // 默认发送配置 'default' => [ // 网关调用策略,默认:顺序调用 'strategy' => \Overtrue\EasySms\Strategies\OrderStrategy::class, // 默认可用的发送网关 'gateways' => [ 'yunpian', 'aliyun', ], ], // 可用的网关配置 'gateways' => [ 'errorlog' => [ 'file' => '/tmp/easy-sms.log', ], 'yunpian' => [ 'api_key' => '824f0ff2f71cab52936axxxxxxxxxx', ], 'aliyun' => [ 'access_key_id' => '', 'access_key_secret' => '', 'sign_name' => '', ], //... ], ]; $easySms = new EasySms($config); $easySms->send(13188888888, [ 'content' => '您的验证码为: 6379', 'template' => 'SMS_001', 'data' => [ 'code' => 6379 ], ]);
6
mochat
Star 2.2k
Fork 471

一套开源的企业微信开发框架和管理系统。基于 PHP 开发的前后端分离、功能强大的企业微信管理平台

mochat
7
humhub
Star 6.2k
Fork 1.6k

用 PHP 写的开源社交平台。看过《社交网络》的小伙伴,都知道大名鼎鼎的 Facebook 最早就是扎克伯格用 PHP 语言写出来的,humhub 能够让不会编程的小伙伴也可以用创建出一个社交平台啦。跟着提示一步步操作,不到 1 分钟我的社交平台就建好了,点击访问

humhub
Star 5.3k
Fork 366

一个编译、安装、管理多版本 PHP 的工具。有了它就可以方便地在不同 PHP 版本之间自由切换啦,特性:

  • 配置选项简化为 Variants 无需担心路径问题
  • 集成至 bash/zsh 等,易于切换版本
  • 易于安装、启用 PHP 扩展
9
code6
Star 1.1k
Fork 202

一款 GitHub 代码泄露监控系统,通过定期扫描 GitHub 发现代码泄露行为。特性:

  • 全可视化界面,操作部署简单
  • 支持 GitHub 令牌管理及智能调度
  • 扫描结果信息丰富,支持批量操作
  • 任务配置灵活,可单独配置任务扫描参数
  • 支持白名单模式,主动忽略白名单仓库
code6
Star 1.2w
Fork 2.3k

PHP 代码的整洁之道,整理了一系列整洁代码实操。小到变量细道 SOLID 都有涉猎,中文译版