forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

LIBCURL implementation example

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
mypspdev



Joined: 11 Jul 2007
Posts: 178

PostPosted: Mon Oct 08, 2007 6:27 pm    Post subject: LIBCURL implementation example Reply with quote

Please I've compiled CURL and implemented as from some available examples.
My problem is concerning may be some DHCP permission or patch to be added.
I can call some "my home private network" ftp servers or http servers, but when attempting to access web URL, no connection is available to externa internet sites.

My program act as follows for calls to an intranet FTP, it works well both with ftp server on another PSP or on PC:

res=curl_easy_setopt(curl, CURLOPT_URL, "ftp://192.168.1.23");
res=curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);

It doesn't work for web URL.

Any patch or further parameter recommended to pass through the access point?

Thanks in advance for help
Back to top
View user's profile Send private message
tabularasa



Joined: 22 Nov 2006
Posts: 13

PostPosted: Mon Oct 08, 2007 9:17 pm    Post subject: Reply with quote

With web URL you mean something like 'google.com'?
Well, then you have to resolve the hostname first.
Back to top
View user's profile Send private message
mypspdev



Joined: 11 Jul 2007
Posts: 178

PostPosted: Mon Oct 08, 2007 9:31 pm    Post subject: Reply with quote

tabularasa wrote:
With web URL you mean something like 'google.com'?
Well, then you have to resolve the hostname first.


Thanks for your attention.
Yes,I mean "www.google.com" for example.

No! Back to the problem of setting-up a resolver running under 3.xx and not under 1.50 as from pspdev example!

I'm in trouble to set-up a resolver under 3.xx:
as you can see here http://forums.ps2dev.org/viewtopic.php?t=9097

My resover attempt is here:
http://rapidshare.com/files/60685449/Resolver3xx.rar.html

May you please help me? thanks a lot
Back to top
View user's profile Send private message
tacoSunday



Joined: 31 Aug 2007
Posts: 34

PostPosted: Fri Oct 12, 2007 7:00 am    Post subject: Reply with quote

Um, I dont think he needs to resolve the hostname first. libcurl does that itself(I know this to be true as I use libcurl on the psp without resolving the hostname). This is the most of the point of libcurl, to parse and resolve the URL(as well as handle the underlying protocols). You probably just have a fubared router config. Make sure your wifi router has the dns servers and whatnot set up correctly.

EDIT:
It has just come to mind that I am not using the svn version of libcurl. Mabey the resolver in the svn version is messed up. Try this version.
Back to top
View user's profile Send private message
mypspdev



Joined: 11 Jul 2007
Posts: 178

PostPosted: Fri Oct 12, 2007 7:40 am    Post subject: Reply with quote

Resolving should work only if PSP Network Connection has dynamic IP Address from DHCP.
If IP is preassigned by PSP Network connection (fixed) resolving doen't work at all.

CURL is simple: few commands for doing everything. I've tested it.

Thanks
Back to top
View user's profile Send private message
tacoSunday



Joined: 31 Aug 2007
Posts: 34

PostPosted: Fri Oct 12, 2007 7:53 am    Post subject: Reply with quote

Glad to hear it. On the other hand, setting the primary and secondary dns servers in the psp's manual ip config doesn't work? I'm going to check that one out when I get home.

EDIT: Hehe, butterfingers!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group