Skip to content

Instantly share code, notes, and snippets.

@XianThi
XianThi / wt.php
Created November 8, 2018 15:57
e-sim work train script
<?php
function crul($url,$header,$cookie_path,$post=false,$cookie=false){
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLINFO_HEADER_OUT, true);
curl_setopt($ch, CURLOPT_HEADER, 1);
if($post !== false){
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
}