| View previous topic :: View next topic |
| Author |
Message |
mypspdev
Joined: 11 Jul 2007 Posts: 178
|
Posted: Mon Oct 08, 2007 6:27 pm Post subject: LIBCURL implementation example |
|
|
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 |
|
 |
tabularasa
Joined: 22 Nov 2006 Posts: 13
|
Posted: Mon Oct 08, 2007 9:17 pm Post subject: |
|
|
With web URL you mean something like 'google.com'?
Well, then you have to resolve the hostname first. |
|
| Back to top |
|
 |
mypspdev
Joined: 11 Jul 2007 Posts: 178
|
Posted: Mon Oct 08, 2007 9:31 pm Post subject: |
|
|
| 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 |
|
 |
tacoSunday

Joined: 31 Aug 2007 Posts: 34
|
Posted: Fri Oct 12, 2007 7:00 am Post subject: |
|
|
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 |
|
 |
mypspdev
Joined: 11 Jul 2007 Posts: 178
|
Posted: Fri Oct 12, 2007 7:40 am Post subject: |
|
|
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 |
|
 |
tacoSunday

Joined: 31 Aug 2007 Posts: 34
|
Posted: Fri Oct 12, 2007 7:53 am Post subject: |
|
|
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 |
|
 |
|