This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
header('Access-Control-Allow-Origin: *'); | |
//require_once("lib/Conekta.php"); | |
require_once("conekta-php/lib/Conekta.php"); | |
\Conekta\Conekta::setApiKey("XXXXX"); | |
\Conekta\Conekta::setApiVersion("4.0.0"); | |
//$token_id=$_POST['token']; | |
\Conekta\Conekta\Order::create(array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function shst($url){ | |
$apiurl="https://api.shorte.st/v1/data/url"; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser. | |
curl_setopt($ch, CURLOPT_URL, $apiurl); | |
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT' ); | |
// Agregamos el Token que copiamos de la pagina. | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('public-api-token: XXXXXXXXXXXXXXXXXXX','X-HTTP-Method-Override: PUT')); |
NewerOlder