clarkkent 0 Newbie Poster

Ok i have been reading up on ServiceController and have created an instance of it. On my local machine i have this directory path C:\\ruby\ruby\bin\ and in this directory i have these files along with others of course ( mongrel_rails, mongrel_rails.bat, mongrel_rails.cmd, mongrel_rails_service.cmd) From what i see on the mongrel website it says to use mongrel_rails

excerpt from website

$ mongrel_rails service::install -N myapp \ 
      -c c:\my\path\to\myapp -p 4000 -e production
  $ mongrel_rails service::start -N myapp

So i assume, the correct file i need is the mongrel_rails file, but how do i tell ServiceController the path to that file, and then send the commands?

clarkkent 0 Newbie Poster

servicecontroller sounds like the right way to go. Is mongrel_service the file i need to use, and how do i associate it with the rails app when i start it?

clarkkent 0 Newbie Poster

I am working on an application to help ease some of the command line stuff for ruby on rails while i learn it. I have the app starting and stopping apache as well as MySql. What i am having trouble with is starting mongrel. I would like to start this with the push of a button similar to how instantrails does, but i want it to start silently so the cmd prompt isn't seen. I want this as i don't want to have to run my app along with instantrails. i would like to do it with one app. I would really appreciate any help anyone can offer on this as i don't know much about mongrel at this point and do not see an exe file like i do with apache and mysql. Here is the link to the mongrel website http://mongrel.rubyforge.org/ and instantrails is here http://instantrails.rubyforge.org/wiki/wiki.pl

clarkkent 0 Newbie Poster

Anybody? I assure you this is not for anything malicious or illegal. Please, i really need help with this.

clarkkent 0 Newbie Poster

This Header function is from VB. I am trying to do the same with C# using HttpWebRequest and having trouble. Can anyone help to show me what i am doing wrong?

Here is a VB function which is sent using winsock.

Function Header(Question As String, Answer As String) As String
Dim str As String
str = "question=" & CaptChaQuestion & "&.intl=us&answer=" & CaptChaAnswer
Header = "POST /captcha1 HTTP/1.1" & vbCrLf & _
"Accept: */*" & vbCrLf & _
"Referer: Project You Are Working On" & vbCrLf & _
"Accept-Language: en-us" & vbCrLf & _
"Content-Type: application/x-www-form-urlencoded" & vbCrLf & _
"Accept-Encoding: gzip, deflate" & vbCrLf & _
"User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)" & vbCrLf & _
"Host: captcha.chat.yahoo.com" & vbCrLf & _
"Content-Length: " & Len(str) & vbCrLf & _
"Connection: Keep-Alive" & vbCrLf & _
"Cache-Control: no-cache" & vbCrLf & _
"Cookie: " & vbCrLf & vbCrLf & str

End Function

Here is what i have been working on in C# but cant seem to get it just right.

public static string HttpPost(string URI, string Parameters)
{
// Create a 'HttpWebRequest' object.
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(URI);

CookieContainer cookieJar = new CookieContainer();
req.CookieContainer = cookieJar;
req.Referer = "http://captcha.chat.yahoo.com/go/captchat/";
req.Accept = "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
req.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6";
req.KeepAlive = true;
req.Referer = URI;
req.ContentType = "application/x-www-form-urlencoded";
req.Method = "POST";


byte[] bytes = System.Text.Encoding.UTF8.GetBytes(Parameters);
req.ContentLength = bytes.Length;

Stream os = …
clarkkent 0 Newbie Poster

Hey guys. I have a prewritten script for uploading images to my server. It already checks filesize which i need. But i also need to check the image width and height to make sure it does not go over a certain size. I am not sure how to accomplish this as i am not very good with CGI. Would any of you mind helping me to accomplish this? Here is the script i have.

#!/usr/bin/perl --

# Installation Instructions
# http://www.perlscriptsjavascripts.com/perl/upload_lite/users_guide.html

# To order a custom install, please visit our "Secure order" page
# and enter the standard installation fee in the "Custom Quote" field

#################################################################### 
#
#	Upload Lite.
#	©2002, PerlscriptsJavaScripts.com
#
#	Requirements:		Perl5 WINDOWS NT or UNIX
#	Created:			Febuary , 2001
#	Author: 			John Krinelos
#	Version:			4.0
#
#	Based on Upload Gold, first release : September 2001
#
#	This script is free, as long as this header and any copyright messages 
#	remains in tact. To remove copyright messages from public web pages you
# 	must purchase copyright removal. 
#	http://www.perlscriptsjavascripts.com/copyright_fees.html
#
#	Agent for copyright : 
#	Gene Volovich
#	Law Partners, 
#	140 Queen St. 
#	Melbourne
#	Ph. +61 3 9602 2266 
#	gvolovich@lawpartners.com.au
#	http://www.lawpartners.com.au/
#	
#################################################################### 

# START USER EDITS

# absolute path to folder files will be uploaded to.
# WINDOWS users, your path would like something like : images\\uploads
# UNIX    users, your path would like something like …