Ejemplo n.º 1
0
<?php

$json = file_get_contents('php://input');
$instring = json_decode($json, true);
$email = $instring["email"];
//$myname = $instring["myname"];
$listid = 982484;
$key = "ZmU4MWI1NjNlNmNjNmJiNzRlNDZjNmU3OGMxNTIzMGY=";
$url = "https://www.feedblitz.com/f.api/user?key=" . $key;
$rest = "email=" . $email . "&listid=" . $listid . "&tags=sidebar,online,site&password=Jerry1997";
//$rest .= "&random=51199314296160";
//$rest .= "&response=97B4E491";
echo fbz_get_web_page($url, $rest, 3);
function fbz_get_web_page($url, $fields_string, $countstring)
{
    $ch = curl_init();
    //set the url, number of POST vars, POST data
    //  curl_setopt($ch,CURLOPT_URL, $url);
    //  curl_setopt($ch,CURLOPT_POST, $countstring);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
    curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string . "&" . $fields_string);
    //execute post
    $result = curl_exec($ch);
    //close connection
    curl_close($ch);
    return $result;
}
Ejemplo n.º 2
0
<?php

$json = file_get_contents('php://input');
$instring = json_decode($json, true);
$email = $instring["email"];
//$myname = $instring["myname"];
$listid = 982484;
$key = "ZmU4MWI1NjNlNmNjNmJiNzRlNDZjNmU3OGMxNTIzMGY=";
//$url = "http://www.feedblitz.com/f?SimpleApiSubscribe&key=ZmU4MWI1NjNlNmNjNmJiNzRlNDZjNmU3OGMxNTIzMGY=&email=".$email."&listid=".$listid."&tags=sidebar,online,site";
$url = "https://www.feedblitz.com/f.api/resourcepath?key=" . $key . "&email=" . $email . "&listid=" . $listid . "&tags=sidebar,online,site";
echo fbz_get_web_page($url);
function fbz_get_web_page($url)
{
    $options = array(CURLOPT_RETURNTRANSFER => true, CURLOPT_HEADER => false, CURLOPT_FOLLOWLOCATION => true, CURLOPT_ENCODING => "", CURLOPT_USERAGENT => "PHP FeedBlitz Web Form Handler", CURLOPT_AUTOREFERER => true, CURLOPT_CONNECTTIMEOUT => 120, CURLOPT_TIMEOUT => 120, CURLOPT_MAXREDIRS => 10);
    $ch = curl_init($url);
    curl_setopt_array($ch, $options);
    $content = curl_exec($ch);
    $err = curl_errno($ch);
    $errmsg = curl_error($ch);
    $header = curl_getinfo($ch);
    curl_close($ch);
    $header['errno'] = $err;
    $header['errmsg'] = $errmsg;
    $header['content'] = $content;
    return $url;
    //$header;
}
function my_curl($url)
{
    if ($email != "") {
        $curl = curl_init($url);
Ejemplo n.º 3
0
<?php

$key = "ZmU4MWI1NjNlNmNjNmJiNzRlNDZjNmU3OGMxNTIzMGY=";
$url = "https://www.feedblitz.com/f.api/captcha?key=" . $key;
echo $url;
$result = fbz_get_web_page($url);
$p = xml_parser_create();
xml_parse_into_struct($p, $result, $vals, $index);
xml_parser_free($p);
echo "Index array\n";
print_r($index);
echo "\nVals array\n";
print_r($vals);
function fbz_get_web_page($url, $fields_string, $countstring)
{
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
    curl_setopt($ch, CURLOPT_POSTFIELDS, $url);
    //execute post
    $result = curl_exec($ch);
    //close connection
    curl_close($ch);
    return $result;
}