1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

php...curl... and *gasp* craigslist...

Discussion in 'PHP & Perl' started by jagass, Jun 23, 2010.

  1. jagass

    jagass Newbie

    Joined:
    Jun 23, 2010
    Messages:
    6
    Likes Received:
    0
    I need to flag a particular person's ads because they owe me significant $$ and they are giving me a run around.

    my curl script is loading the /city/section up then going to the post from there, then its calling the flag url all in that sequence with random intervals between each stage... I had the php script go thru about 100 diff proxies to flag this one ad in new york city and it still didnt come down... I saw the "thanks for flagging this ad, and dont worry if you flagged it accidentally, it takes more than 1 flag to take a post down" from all the different proxy attempts/calls to the flag URL...

    I was wondering if maybe it had something to do w/ my curl cookie settings? How can I clear my curl cache & cookies after each time I call the flag url? is it not counting the flag because it cant set a cookie? Any ideas?

    Thx in advance
     
    Last edited: Jun 23, 2010
  2. jagass

    jagass Newbie

    Joined:
    Jun 23, 2010
    Messages:
    6
    Likes Received:
    0
    the thing is that when I flag an ad normally, it just says "thanks for flagging" and doesnt take me to a new page, is clist detecting the proxies?
     
  3. jbtalk2me

    jbtalk2me Registered Member

    Joined:
    Jan 9, 2009
    Messages:
    54
    Likes Received:
    479
    It ususally takes 3 flags to bring an ad down...

    This work arounf is easy. Buy a $10 a month Dial Up service. When you dial in you are assigned an IP address. There will be a list of phone numbers to dial in. Just use Phone numbers from around the country each time you dial in . Connect three times and the ad is toast. CL can't catch this.
     
  4. CyrusVirus

    CyrusVirus BANNED BANNED Premium Member

    Joined:
    Aug 20, 2009
    Messages:
    1,110
    Likes Received:
    686
    or your could post a link here to all of the ads and im sure someone will flag it, or not, maybe try hide-my-ip
     
  5. goawayplease

    goawayplease Regular Member

    Joined:
    Apr 10, 2008
    Messages:
    299
    Likes Received:
    67
    TOR, Remote DSL, and VPN are other options.
     
  6. madblacker

    madblacker Regular Member

    Joined:
    Nov 2, 2009
    Messages:
    268
    Likes Received:
    19
    well, it could be the cookie thing I suppose... try this after each iteration of the curl script that flags the ad, the curl script automatically creates the new cookie file so its ok to delete it

    Code:
    $myFile = "mycookiefile.txt";
    unlink($myFile);
    
     
  7. jagass

    jagass Newbie

    Joined:
    Jun 23, 2010
    Messages:
    6
    Likes Received:
    0
    Hey madblacker


    this is my curl settings and how i handeled clearing the cookies...

    function getPage($proxy, $url, $referer, $agent, $header, $timeout) {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, $header);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_PROXY, $proxy);
    //curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    curl_setopt($ch, CURLOPT_REFERER, $referer);
    curl_setopt($ch, CURLOPT_USERAGENT, $agent);
    curl_setopt($ch, CURLOPT_COOKIESESSION, FALSE);
    curl_setopt ($ch, CURLOPT_COOKIEJAR, "c:\\xampp\htdocs\cookies.txt");
    curl_setopt ($ch, CURLOPT_COOKIEFILE, "c:\\xampp\htdocs\cookies.txt");
    //
    $result['EXE'] = curl_exec($ch);
    $result['INF'] = curl_getinfo($ch);
    $result['ERR'] = curl_error($ch);

    curl_close($ch);
    $handle = fopen("C:\\xampp\htdocs\cookies.txt", "w");
    fwrite($handle, ' ');
    fclose($handle);


    not doing it... any ideas???


    I recorded a macro that changed ip's thru TOR and then would reflag all the ads that were searched in that particular section with his signature but it doesnt seem to be working.... its run probably 30 times on the ads and only 1 has disappeared...



    Thanks
     
  8. jagass

    jagass Newbie

    Joined:
    Jun 23, 2010
    Messages:
    6
    Likes Received:
    0
    $header[] = "Accept: text/xml,application/xml,application/xhtml+xml,";
    $header[] .= "text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
    $header[] = "Cache-Control: max-age=1, must-revalidate";
    $header[] = "Connection: keep-alive";
    $header[] = "Keep-Alive: 300";
    $header[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
    $header[] = "Accept-Language: en-us,en;q=0.5";
    $header[] = "Pragma: ";

    $useragent[] = 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5?';
     
  9. kaidoristm

    kaidoristm Power Member

    Joined:
    Feb 13, 2009
    Messages:
    561
    Likes Received:
    726
    Occupation:
    Freelancer
    Location:
    Estonia
    Home Page:
    Maybe flagging page requires cookie from previous page.
     
  10. jagass

    jagass Newbie

    Joined:
    Jun 23, 2010
    Messages:
    6
    Likes Received:
    0
    the only cookies i see from the previous page is the language being set... there has to be a cache or something??? where is session info stored?