//下载远程图片function down_pic($url,$path){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); $header = array(); $header[] = 'Host: t.xx.com'; $header[] = 'Accept-Encoding: gzip...
/** * 根绝文件路径创建对应的目录 * * @param string $path a/b/c/d/ * */ function makeDirByPath($path){ if(!file_exists($path)){ makeDirByPath(dirname($path)); mkdir($path, 0777); ...
https://www.xxx.com/upload/attach/202010/1_GWX3MVCB5SARKGF.jpg upload/attach/202010/ echo geturlPath($url,"https://www.xxx.com/").'<br/>';; function geturlPath($url,$wwwurl){ $ma...
<?php function curlget($url,$method='get',$data=null){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($c...
PHP实现图片指定区域打印文字和图片 在一些通过模板制作效果图的需求中需要用到图片上加文字或者加图片。 下面这个类可以实现在某个区域内(通过left、top,width、height圈定区域)内居中打印文字和图片,文字可以自动换行,水平和垂直居中。 <?php //拼图 class DrawText{ private $sourceImg; ...
$url = @$_GET["url"]; $info=@file_get_contents($url); preg_match('/<title>(.*?)<\/title>/',$info,$title); echo $title;
<?php $url = "http://www.baidu.com"; /** * Takes a domain name and returns SSL certificate information * * @param string $domain_name * @return array $certinfo */ function getSS...
<?php $url = "http://www.baidu.com"; $orignal_parse = parse_url($url, PHP_URL_HOST); $get = stream_context_create(array("ssl" => array("capture_peer_cert" => ...
<?phpif($fp = tmpfile()){$ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"https://www.baidu.com/"); curl_setopt($ch, CURLOPT_STDERR, $fp); curl_setopt($ch, CURLOPT_CERTINFO, 1); curl_s...
class SSL { public $domain, $validFrom, $validTo, $issuer, $validity, $validitytot, $crtValRemaining; private static function instantiate($url, $info) { $obj = new static; ...