コード例 #1
0
ファイル: li.php プロジェクト: JalpMi/v2contact
 function nxsCptCheck_ajax()
 {
     global $nxs_gCookiesArr;
     if ($_POST['c'] != '') {
         $seForDB = get_option('nxs_li_ctp_save');
         $ser = maybe_unserialize($seForDB);
         $nxs_gCookiesArr = $ser['c'];
         $flds = $ser['f'];
         $flds['recaptcha_response_field'] = $_POST['c'];
         $cfldsTxt = build_http_query($flds);
         //  prr($cfldsTxt); prr($nxs_gCookiesArr);
         $contents2 = getCurlPageX('https://www.linkedin.com/uas/captcha-submit', 'https://www.linkedin.com/uas/login-submit', false, $cfldsTxt, false, $advSettings);
         //   prr($contents2);
         if (stripos($contents2['content'], 'The email address or password you provided does not match our records') !== false) {
             echo "Invalid Login/Password";
             die;
         }
         if (stripos($contents2['url'], 'linkedin.com/uas/captcha-submit') !== false) {
             echo "Wrong Captcha. Please try Again";
         }
         if (stripos($contents2['url'], 'linkedin.com/home') !== false) {
             echo "OK. You are In";
             $contents3 = getCurlPageX('http://www.linkedin.com/profile/edit?trk=tab_pro', 'http://www.linkedin.com/home', false, '', false, $advSettings);
             // prr($contents3);
             if ($_POST['i'] != '') {
                 global $plgn_NS_SNAutoPoster;
                 if (!isset($plgn_NS_SNAutoPoster)) {
                     return;
                 }
                 $options = $plgn_NS_SNAutoPoster->nxs_options;
                 $options['li'][$_POST['i']]['uCook'] = $nxs_gCookiesArr;
                 if (is_array($options)) {
                     update_option('NS_SNAutoPoster', $options);
                 }
             }
         }
     }
     die;
 }
コード例 #2
0
	function doPostToPinterest($msg, $imgURL, $lnk, $boardID) {
		global $nxs_gTkn, $nxs_gCookiesArr;
		$mgs = urlencode ( $msg );
		$lnk = urlencode ( $lnk );
		$fldsTxt = 'caption=' . $msg . '&board=' . $boardID . '&tags=&replies=&buyable=&title=&media_url=' . $imgURL . '&url=' . $lnk . '&via=&csrfmiddlewaretoken=' . $nxs_gTkn . '&form_url=';
		if (trim ( $boardID ) == '')
			return "Board is not Set";
		if (trim ( $imgURL ) == '')
			return "Image is not Set";
		$contents = getCurlPageX ( 'http://pinterest.com/pin/create/button/', '', true, $fldsTxt, false, '' ); // prr($contents);
		
		
		if (stripos ( $contents, 'blocked this source' ) !== false)
			return "Pinterest ERROR: 'The Source is blocked'. Please see https://support.pinterest.com/entries/21436306-why-is-my-pin-or-site-blocked-for-spam-or-inappropriate-content/ for more info";
		if (stripos ( $contents, 'Oops' ) !== false && stripos ( $contents, '<body>' ) !== false)
			return 'Pinterest ERROR MESSAGE : ' . strip_tags ( CutFromTo ( $contents, '<body>', '</body>' ) );
		if (stripos ( $contents, 'pinSuccess' ) !== false)
			return "OK";
		else
			return $contents;
	}
コード例 #3
0
ファイル: dl.php プロジェクト: JalpMi/v2contact
 function doConnectToDelicious($u, $p)
 {
     global $nxs_gCookiesArr;
     $nxs_gCookiesArr = array();
     $advSettings = array();
     $fldsTxt = 'username='******'&password='******' http://www.delicious.com/login ', '', false, $fldsTxt, false, $advSettings);
     //  prr($nxs_gCookiesArr);   prr($contents);
 }
コード例 #4
0
	function doPostToBlogger($blogID, $title, $msg, $tags = '') {
		$rnds = rndString ( 35 );
		$blogID = trim ( $blogID );
		$gpp = "http://www.blogger.com/blogger.g?blogID=" . $blogID;
		$refPage = "http://www.blogger.com/home";
		$contents = getCurlPageX ( $gpp, $refPage, true );
		$jjs = CutFromTo ( $contents, 'BloggerClientFlags=', '_layoutOnLoadHandler' );
		$j69 = ''; // prr($contents); echo "\r\n"; echo "\r\n";
		if ($j69 == '' && strpos ( $jjs, '64:"' ) !== false) {
			$j69 = CutFromTo ( $jjs, '64:"', '"' );
			if (strpos ( $j69, ':' ) === false || (strpos ( $j69, '/' ) !== false))
				$j69 = '';
		}
		if ($j69 == '' && strpos ( $jjs, '65:"' ) !== false) {
			$j69 = CutFromTo ( $jjs, '65:"', '"' );
			if (strpos ( $j69, ':' ) === false || (strpos ( $j69, '/' ) !== false))
				$j69 = '';
		}
		if ($j69 == '' && strpos ( $jjs, '66:"' ) !== false) {
			$j69 = CutFromTo ( $jjs, '66:"', '"' );
			if (strpos ( $j69, ':' ) === false || (strpos ( $j69, '/' ) !== false))
				$j69 = '';
		}
		if ($j69 == '' && strpos ( $jjs, '67:"' ) !== false) {
			$j69 = CutFromTo ( $jjs, '67:"', '"' );
			if (strpos ( $j69, ':' ) === false || (strpos ( $j69, '/' ) !== false))
				$j69 = '';
		}
		if ($j69 == '' && strpos ( $jjs, '68:"' ) !== false) {
			$j69 = CutFromTo ( $jjs, '68:"', '"' );
			if (strpos ( $j69, ':' ) === false || (strpos ( $j69, '/' ) !== false))
				$j69 = '';
		}
		if ($j69 == '' && strpos ( $jjs, '69:"' ) !== false) {
			$j69 = CutFromTo ( $jjs, '69:"', '"' );
			if (strpos ( $j69, ':' ) === false || (strpos ( $j69, '/' ) !== false))
				$j69 = '';
		}
		if ($j69 == '' && strpos ( $jjs, '70:"' ) !== false) {
			$j69 = CutFromTo ( $jjs, '70:"', '"' );
			if (strpos ( $j69, ':' ) === false || (strpos ( $j69, '/' ) !== false))
				$j69 = '';
		}
		if ($j69 == '' && strpos ( $jjs, '71:"' ) !== false) {
			$j69 = CutFromTo ( $jjs, '71:"', '"' );
			if (strpos ( $j69, ':' ) === false || (strpos ( $j69, '/' ) !== false))
				$j69 = '';
		}
		if ($j69 == '' && strpos ( $jjs, '72:"' ) !== false) {
			$j69 = CutFromTo ( $jjs, '72:"', '"' );
			if (strpos ( $j69, ':' ) === false || (strpos ( $j69, '/' ) !== false))
				$j69 = '';
		}
		if ($j69 == '' && strpos ( $jjs, '73:"' ) !== false) {
			$j69 = CutFromTo ( $jjs, '73:"', '"' );
			if (strpos ( $j69, ':' ) === false || (strpos ( $j69, '/' ) !== false))
				$j69 = '';
		}
		if ($j69 == '' && strpos ( $jjs, '74:"' ) !== false) {
			$j69 = CutFromTo ( $jjs, '74:"', '"' );
			if (strpos ( $j69, ':' ) === false || (strpos ( $j69, '/' ) !== false))
				$j69 = '';
		}
		if ($j69 == '' && strpos ( $jjs, '75:"' ) !== false) {
			$j69 = CutFromTo ( $jjs, '75:"', '"' );
			if (strpos ( $j69, ':' ) === false || (strpos ( $j69, '/' ) !== false))
				$j69 = '';
		}
		if ($j69 == '' && strpos ( $jjs, '76:"' ) !== false) {
			$j69 = CutFromTo ( $jjs, '76:"', '"' );
			if (strpos ( $j69, ':' ) === false || (strpos ( $j69, '/' ) !== false))
				$j69 = '';
		}
		if ($j69 == '' && strpos ( $jjs, '77:"' ) !== false) {
			$j69 = CutFromTo ( $jjs, '77:"', '"' );
			if (strpos ( $j69, ':' ) === false || (strpos ( $j69, '/' ) !== false))
				$j69 = '';
		}
		$gpp = "http://www.blogger.com/blogger_rpc?blogID=" . $blogID;
		$refPage = "http://www.blogger.com/blogger.g?blogID=" . $blogID;
		$spar = '{"method":"editPost","params":[,1,"","",,1,0,1,3,0,2,2,,0,[,,,,,,""],"en",0,[,' . date ( "Y" ) . ',' . date ( "n" ) . ',' . date ( "j" ) . ',' . date ( "G" ) . ',' . date ( "i" ) . '],,,0,"",[,1,[,0,0,0,0,0,0,0,0,0,"0"]],3],"xsrf":"' . $j69 . '"}';
		$contents = getCurlPageX ( $gpp, $refPage, true, $spar );
		$newpostID = CutFromTo ( $contents, '"result":[null,"', '"' );
		if ($tags != '')
			$pTags = '["' . $tags . '"]';
		else
			$pTags = ''; // prr($pTags);
		$pTags = str_replace ( '!', '', $pTags );
		$pTags = str_replace ( '.', '', $pTags );
		// $spar = '{"method":"editPost","params":[,1,"'.addslashes($title).'","'.addslashes($msg).'","'.$newpostID.'",0,0,1,3,0,2,2,'.$pTags.',0,[,,,,,,""],"en",0,[,'.date("Y").','.date("n").','.date("j").','.date("G").','.date("i").'],,,0,"",[,1,[,0,0,0,0,0,0,0,0,0,"0"]],1],"xsrf":"'.$j69.'"}';
		
		$msg = str_replace ( "'", '"', $msg );
		$msg = addslashes ( $msg );
		$msg = str_replace ( "\r\n", "\n", $msg );
		$msg = str_replace ( "\n\r", "\n", $msg );
		$msg = str_replace ( "\r", "\n", $msg );
		$msg = str_replace ( "\n", '\n', $msg );
		
		$spar = '{"method":"editPost","params":{"1":1,"2":"' . addslashes ( $title ) . '","3":"' . $msg . '","4":"' . $newpostID . '","5":0,"6":0,"7":1,"8":3,"9":0,"10":2,"11":2,' . ($pTags != '' ? '"12":' . $pTags . ',' : '') . '"13":0,"14":{"6":""},"15":"en","16":0,"17":{"1":' . date ( "Y" ) . ',"2":' . date ( "n" ) . ',"3":' . date ( "j" ) . ',"4":' . date ( "G" ) . ',"5":' . date ( "i" ) . '},"20":0,"21":"","22":{"1":1,"2":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":"0"}},"23":1},"xsrf":"' . $j69 . '"}';
		
		$contents = getCurlPageX ( $gpp, $refPage, false, $spar ); // prr($spar); prr($contents);
		if (stripos ( $contents ['content'], '"error":' ) !== false) {
			return "Error: " . print_r ( $contents ['content'], true );
		}
		if ($contents ['http_code'] == '200')
			return "OK";
	}
コード例 #5
0
 function nxs_loadFromOKV($okv){ $okvVal = getCurlPageX('http://api.openkeyval.org/'.$okv, '', true); $okvValE = json_decode($okvVal, true);
   if (is_array($okvValE) && isset($okvValE['error'])) return false; else return $okvVal;
 }