Myibidder.com Forums
Myibidder.com|Forums|Register|Donate
User Id
Password
Forums logins require a separate registration.
No login yet? Register here
Forums IndexNew TopicReply
 
 1   2 
General Support for Myibidder service
Comments, Suggestions and Ideas
Running myIbay with parameters Thu Sep 22, 2011 01:35 AM Quote
esb1922
Guest
Avatar

Hi,
I've been developing a software and a part of it is searching on ebay. What I suggest that it'd be nice if your app could accept parameters and be called as a process directly from another software, something like
myibay.exe myEbayId, myEbayPassword, EbayItemId (optional)
I'm petty sure that should be easy to implement and also that would bring you more customers.
What do you think?

Rate: - Rate: Reset Rate: +  Reply Top Last Message
 Thu Sep 22, 2011 03:31 AM Quote
Sashka
Support
Avatar
Posts: 3652
Member Since: Feb 13, 2008
Location: www.myibidder.com

I don't think that will bring more customers, but you can implement using your browser or some http-based client like wget or curl.

You can make two calls: login once, save the session cookies and additem with the new cookie as many times as you need.

Rate: - Rate: Reset Rate: +  Reply Top Last Message
 Fri Sep 23, 2011 01:12 PM Quote
esb1922
Guest
Avatar

My app is the windows app not web and I also use your standalone version not web-based.

As for the customers, I meant if I had such feature, some of my clients would want to buy myibay.

Rate: - Rate: Reset Rate: +  Reply Top Last Message
 Fri Sep 23, 2011 06:28 PM Quote
Sashka
Support
Avatar
Posts: 3652
Member Since: Feb 13, 2008
Location: www.myibidder.com

You have to have Internet connection for the app to work.
The Windows app connects to the Web server anyway, so you may want to skip this extra dependency to avoid the unneccessary latency for your app.
Also, it's free.

Rate: - Rate: Reset Rate: +  Reply Top Last Message
 Sat Sep 24, 2011 02:02 PM Quote
esb1922
Guest
Avatar

I still prefer to call the windows app. Basically I don't even ask to snipe automatically - all I ask is to get parameters and populate text boxes on load. As simple as that.

Rate: - Rate: Reset Rate: +  Reply Top Last Message
 Sat Sep 24, 2011 05:09 PM Quote
Sashka
Support
Avatar
Posts: 3652
Member Since: Feb 13, 2008
Location: www.myibidder.com

That's not so simple to implement actually.
All parameters are transferred over network and not over command line parameters, multiple instances of app do not talk to each other if you need to add several items sequentially. There are other complications too.

I can give you an example of the script to do it over Web, that's really easy. You should always try the easiest methods first. The simpler your design, the more reliable it is (KISS method does its magic).

Rate: - Rate: Reset Rate: +  Reply Top Last Message
 Sat Sep 24, 2011 09:07 PM Quote
esb1922
Guest
Avatar

that would be nice if you provide an example of the script, Will wait for that. Thx

Rate: - Rate: Reset Rate: +  Reply Top Last Message
 Sun Sep 25, 2011 12:27 AM Quote
Sashka
Support
Avatar
Posts: 3652
Member Since: Feb 13, 2008
Location: www.myibidder.com

I need some info on your app. If a language does not matter, I can provide a generic script. Let me know.

Rate: - Rate: Reset Rate: +  Reply Top Last Message
 Sun Sep 25, 2011 05:57 PM Quote
esb1922
Guest
Avatar

C#, VS2010
Thanks

Rate: - Rate: Reset Rate: +  Reply Top Last Message
 Sun Sep 25, 2011 06:07 PM Quote
Sashka
Support
Avatar
Posts: 3652
Member Since: Feb 13, 2008
Location: www.myibidder.com

I did not touch .Net for a long time. But I found some tutorials to get you started.
I used .Net on Linux and never used it on Windows, but that should be the same anyway.

Here is some example on how to do simple HTTP calls:
http://www.csharp-station.com/HowTo/HttpWebFetch.aspx

That's another one with using cookies:
http://www.java2s.com/Tutorial/ASP.NET/0240__Cookie/HttpCookie.htm

Here is another hint on how to login and get cookies:
http://stackoverflow.com/questions/3258044/c-webrequest-http-post-with-cookie-port-from-curl-script

You will have to do HTTP POST call to login, save the cookie and re-use the same session cookie to add items (another HTTP POST calls).
You can view source of the Web pages to see what parameters are required. All parameters are specified within <input> fields.
Make sure you use https for all communications.

Rate: - Rate: Reset Rate: +  Reply Top Last Message
 Sun Oct 23, 2011 01:22 AM Quote
Guest
Avatar

sorry, I've been sick and could only now get back to this task. Unfortunately I can't even get a response after I POST to login. I used suppesedly working code from the Internet but something goes wrong. I guess I shouldn't post the code here. Is there anyway you could take a look at the code?

Rate: - Rate: Reset Rate: +  Reply Top Last Message
 Sun Oct 23, 2011 04:06 AM Quote
Sashka
Support
Avatar
Posts: 3652
Member Since: Feb 13, 2008
Location: www.myibidder.com

I don't think I can take a look if you can't post your code here.

You can also ask on .Net-related forums if you like to get a better response from someone who does .Net on daily basis.
This "POST" call is pretty generic and not specific to Myibidder anyway.

Rate: - Rate: Reset Rate: +  Reply Top Last Message
 Sun Oct 23, 2011 05:48 AM Quote
esb1922
Guest
Avatar

That's not what I meant. I can post the code here if you don't mind...

string strURL = "https://www.myibidder.com/login";
string postData = "login=" + myId + "&password=" + myPwd;

HttpWebRequest request = null;
byte[] byteArray;
CookieContainer cookieContainer = new CookieContainer();

for (int i = 0; i < 2; i++)
{
request = (HttpWebRequest)WebRequest.Create(strURL);
request.Method = "POST";
byteArray = Encoding.UTF8.GetBytes(postData);
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = byteArray.Length;

if (i == 1)
request.CookieContainer = cookieContainer;

using (Stream dataStream = request.GetRequestStream())
{
dataStream.Write(byteArray, 0, byteArray.Length);
}

using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
{
if (i == 1)
break;

foreach (Cookie cookie in response.Cookies)
{
cookieContainer.Add(cookie);
}

using (Stream responseStream = response.GetResponseStream())
{
using (StreamReader reader = new StreamReader(responseStream))
{
string responseFromServer = reader.ReadToEnd();
}
}
}

strURL = "https://www.myibidder.com/main";
postData = "additem_itemid=110759565141&additem_mybid=24";
}

I agree it's pretty generic and it has been taken from the other forum. I actually tried many samples and none of them works or I do something wrong. Thanks anyway

Rate: - Rate: Reset Rate: +  Reply Top Last Message
 Sun Oct 23, 2011 04:03 PM Quote
Sashka
Support
Avatar
Posts: 3652
Member Since: Feb 13, 2008
Location: www.myibidder.com

Your POST data has wrong parameters. Check the html page of the form on Myibidder to get the correct parameters.

Also, why you do it in for loop? Just one single request is good enough.

Rate: - Rate: Reset Rate: +  Reply Top Last Message
 Sun Oct 23, 2011 05:07 PM Quote
esb1922
Guest
Avatar

I actually also tried
https://www.myibidder.com/login
login=esb1922&pass=XXXXX
and
https://www.myibidder.com/main
newid=110759565141&mybid=24&groupid=0
with the same result.

Not sure how to do it with a single request - I'm not good with web classes and forums don't help. I used a loop because I thought I could login and snipe at the same time.

Rate: - Rate: Reset Rate: +  Reply Top Last Message
 Sun Oct 23, 2011 05:12 PM Quote
Sashka
Support
Avatar
Posts: 3652
Member Since: Feb 13, 2008
Location: www.myibidder.com

You gave me two different requests. You can't expect the same result from them.
What do you get when you do login?

The for loop is mainly for identical repeatable procedures. You should not put different things in the same loop -- your code is not readable.

Rate: - Rate: Reset Rate: +  Reply Top Last Message
 Sun Oct 23, 2011 05:32 PM Quote
esb1922
Guest
Avatar

"What do you get when you do login? "

Just the front page

Rate: - Rate: Reset Rate: +  Reply Top Last Message
 Sun Oct 23, 2011 05:38 PM Quote
Sashka
Support
Avatar
Posts: 3652
Member Since: Feb 13, 2008
Location: www.myibidder.com

Did you try it in your browser?

https://www.myibidder.com/login?login=esb1922&pass=XXXXX

Rate: - Rate: Reset Rate: +  Reply Top Last Message
 Sun Oct 23, 2011 05:45 PM Quote
esb1922
Guest
Avatar

yep - works fine

Rate: - Rate: Reset Rate: +  Reply Top Last Message
 Sun Oct 23, 2011 06:28 PM Quote
Sashka
Support
Avatar
Posts: 3652
Member Since: Feb 13, 2008
Location: www.myibidder.com

Then check how you get and process cookies. I think this is where you problem is.

When you login, you should get some session cookies. You must give the same cookies back to the server when adding a new snipe.

Rate: - Rate: Reset Rate: +  Reply Top Last Message
Forums IndexNew TopicReply
 
 1   2 
All times are GMT . The time is 05:17pm.
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2007, Jelsoft Enterprises Ltd.