I'm not sure if anyone can help.
I wrote a script that automatically posts pictures to picposts. This is something I use everyday and makes the process automated so that I can do other things once I set it up and type it in.
Anyway, it worked perfect for awhile; Just the other day I tried it and it stated a message on there "my" screen stating: "ive been banned" i emailed them; they say im not banned.
Heres the clintcher: I type in all my "usual" info exactly the same info as my script AND IT WORKS perfectly.
My question is: im obvisouly using LWP:useragent; http:headers; http:request and CGI to be able to accomplish this. Sending in all my own info makes there script think im actually doing it manually. I dont have time to do this everyday without my script.
I need to know from all you Professionals: What could "maybe" they have put into there "cgi-bin" files to prevent me from posting thru my script BUT, allow it to work if i do it manually.
I dont belive its cookies and iam already sending in http_referrer;http_host;server_name to there script.
I m sorry for being long winded!
Heres an example but not the actual LONG script
there is lots of missing pieces of this code I left out:
#!/usr/bin/perl
use CGI;
use HTTP::Headers;
use HTTP::Request;
use LWP::UserAgent;
$q = new CGI;
$posttourl = "http://www.theposturlhere.com/cgi-bin/post.cgi";
$refererurl = "http://www.theposturlrefererhere.com/cgi-bin/post.cgi";
$q = new CGI( {
pic_url=>"$pictureurl",
description =>$picturedes,
banner_url=>$bannerurl,
banner_link=>$siteurl,
banner_text=>$bannertext,
email=>$email,
nickname=>$poster,
category=>$postcat,
action=>"done",
});
$formdata = $q->query_string;
$h = new HTTP::Headers(
Accept=>'*/*',
Referer=> $refererurl,
user_agent=>'Mozilla/4.5',
virtual_host=>'216.and so on,
server_name=>'www.thesite.com',
script_name=>'/post.cgi',
remote_host=>'www.thesiteagain.com',
http_user_agent=>'Mozilla/4.5',
Content_Type=>'application/x-www-form-urlencoded'
);
$req = new HTTP::Request(
"POST",
$posttourl,
$h
);
$req->content($formdata);
$ua = new LWP::UserAgent;
$ua->agent( "Mozilla/4.5" );
$response = $ua->request($req);
print $q->header;#blah blah
print $q->start_html(-script=>$JSCRIPT);
print $response->content;
print $q->end_html;
Edited by boo_radley : Closed assorted tags.
Edit kudra,
2001-09-23
Removed colours for themesafe viewing
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.