What Language Should I Use???

cyprex

New member
Sep 30, 2009
28
0
0
I need suggestions on what programming lanugage to use!

I want to write some software that can interact with IE8 to fill out forms and navigate through webpages. (Create my own gmail account creator).

I will need to integrate the decaptcher dot com plugin, and also have proxy support.

Any suggestions? I hear delphi is pretty good but what are your thoughts?
 


PHP with Curl or if you want to interact with a browser try some sort of macro. VB.NET can interact with a browser but I absolutely hate it.
 
that has to be executed from a server though correct? im looking to create a standalone program that can just be executed from windows. why are you so against vb.net? you think delphi is bad?
 
that has to be executed from a server though correct? im looking to create a standalone program that can just be executed from windows. why are you so against vb.net? you think delphi is bad?

Client side programming is extremely limited, least in the sense if having it interact from IE8 (which in itself is also restrictive). PHP, ASP.net (server-side), JSP, ColdFusion, etc etc run from the server would have far more flexibility, and could run more server based functions without requiring the users to give you permission. Not so with client side programming to the extent you seem to be describing. Chances are you'll have the hardest time getting your ActiveX controls past the 'trusted' stage.

I would say PHP/Curl in this case as well (or Python/Perl if you got yourself a dedicated box), since you'd break the shackles of browser dependency that way.

Delphi is basically "Visual Pascal", I used to use that back in 2001 or so, I don't see it much for web application development but more of an easy desktop development tool (course depends on your background be it C++, Basic, Pascal, Forth, etc. )
 
kblessinggr, definitely some good advice. I just know of a ton of programs out there that are client side and they work great (jiffy, CLAD genius). Just to clarify...those programs are executable run in windows...does that mean they are client side? or is it possible to use php/curl in a standalone windows executable?
sorry for the noob question...
 
kblessinggr, definitely some good advice. I just know of a ton of programs out there that are client side and they work great (jiffy, CLAD genius). Just to clarify...those programs are executable run in windows...does that mean they are client side? or is it possible to use php/curl in a standalone windows executable?
sorry for the noob question...

PHP can run in console/CLI mode if you compile it with those options enabled, don't know anything offhand to do it directly from windows; there may be something that will work in cygwin.
 
kblessinggr, definitely some good advice. I just know of a ton of programs out there that are client side and they work great (jiffy, CLAD genius). Just to clarify...those programs are executable run in windows...does that mean they are client side? or is it possible to use php/curl in a standalone windows executable?
sorry for the noob question...

While a 'compiler' for php exists, its generally best to keep that on a server setup (be it a webserver, or a local server running on your own machine).

If you are looking primarily to run an executable, possibly via the commandline (as opposed to a graphical interface), your best bet (least in my opinion anyways) is going to be Python, its a higher level programming language, supported on nearly every platform/operating system, and there are plenty of extensions (such as cURL support).

It can also be compiled into a binary on a number of platforms such as windows using py2exe, but in it's original .py source can be run via the python interpreter on any OS that its installed on (windows usually requires it to be installed, but almost every other platform has least version 2.4 installed already) basically meaning locally via windows, or remotely on a linux server.

To get a small idea of the syntax, this is simple craigslist email scraper I wrote in python:

Code:
import re
import sys
import urllib2
from urlparse import urljoin
from BeautifulSoup import BeautifulSoup

def searchUrl(cururl, sfile, category, begin = False):
    try:
        response = urllib2.urlopen(cururl)
        html = response.read()
        soup = BeautifulSoup(html)

	emails = soup.findAll('a', href=re.compile('^mailto:'))

	if len(emails) > 0:
	    for email in emails:
		email = email['href'][email['href'].index(':')+1:email['href'].index('?')]

	    sfile.write(email+'\n')
	    count = 0
	else:
	    links = soup.findAll('a', href=re.compile('^(/(.+/)?%s/.+)' % (category,)))
	    count = len(links)
	    if "index" in cururl:
		print "Parsing %s (%d postings)" % (cururl, count)
            
	    for link in links:
                searchUrl(urljoin(cururl, link['href']), sfile, category)
    
        response.close()
	return count	
    except ValueError:
        print "Could not parse %s, skipping" % (cururl,)

#Initialization
parameterflag = False
arguments = len(sys.argv)
page = 0
begin = True
    
if arguments > 1:
    starturl = sys.argv[1]
    folder = starturl.split('/')
    rcategory = folder[3]
    if len(rcategory) == 0:
	parameterflag = True
    else:
	if arguments > 2:
	    sfile = sys.argv[2]
	else:
	    sfile = "emails"
else:
    parameterflag = True
    
print "ScrapCL 0.1.2 by Karl Blessing (www.karlblessing.com)\n--------------------------------------------------\n"
if parameterflag:
    print "Usage: scrapcl start_url [save_file_name]\n"
    print "start_url must be a craigslist url with a preceeding category,\nresults are restricted to this category\n"
    print "\thttp://city.craigslist.org/category/\n"
    print "save_file_name is an optional parameter, if no name is provided\n emails will be defaulted.\n"
    print "\tscrapcl http://city.craigslist.org/sys/ syse\n\twill save a file called syse.txt with the emails (one per line)"

else:
    print "Starting from: %s\nSaving emails to %s.txt (this may take several minutes)" % (starturl, sfile)
    outputfile = open(sfile+".txt", "a")

    while page < 50000:
	if page > 0:
	    url = "%sindex%d.html" % (starturl, page)
	else:
	    url = "%sindex.html" % (starturl,)
	    begin = False
	    
	count = searchUrl(url, outputfile, rcategory, begin)

	if count < 100:
	    break;
	else:
	    page += 100

    print "Finished Collecting emails into %s.txt" % (sfile,)
    outputfile.close()

Structure wise, it's forcefully cleaner than PHP.
 
PHP can run in console/CLI mode if you compile it with those options enabled, don't know anything offhand to do it directly from windows; there may be something that will work in cygwin.

there does exist a php2exe type of compiler, but it doesn't always seem to work like you'd expect. But if you already got a WAMP type of setup (Windows + Apache + MySQL + PHP), you can either run the php script from your browser locally, or you can pass the .php file thru to the cgi executable in the terminal.
 
You can compile your php-cli scripts to run as a stand alone exe (provided you have proper dlls), but what a fucking stupid thing to do.