Sorry about the PHP. I got things to work on my hosted site - my local webserver wasn't liking things for some reason.
Thanks :) On Thu, Aug 4, 2011 at 10:55 AM, Keary Suska <cocoa-...@esoteritech.com>wrote: > On Aug 4, 2011, at 7:52 AM, Eric E. Dolecki wrote: > > > I have a little script sitting locally on my Mac (webserver). > > > > http://eric.domain.com/iOS_Log/logger.php: > > > > <? > > $myFile = "yabba.txt"; > > $fh = fopen($myFile,'a') or die("can't open file"); > > $query = $_GET["string"]; > > $stringData = $query."\n"; > > fwrite($fh,$stringData); > > fclose($fh); > > ?> > > Just a note that it is not useful to post the PHP code--not only is it not > relevant to your case, there is no guarantee that list members are familiar > enough with PHP to make real sense of it. > > > I am simply trying to send the PHP a small string from my app on a > device. > > I've seen examples of POST everywhere, but looking for GET. > > > > Of course if I do *http://eric.domain.com/iOS_Log/logger.php?string=Foo*in > > a browser it works fine. > > Anyway--can you be more specific about your problem? Regarding specifying > query strings, Cocoa doesn't provide any convenient means that I know of to > build query strings so you have to manually assemble them. Something like: > > NSString *urlString = [NSString stringWithFormat:@" > http://eric.domain.com/iOS_Log/logger.php?string=%@", [foo > stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]]; > NSURL *url = [NSURL URLWithString: urlString]; > > HTH, > > Keary Suska > Esoteritech, Inc. > "Demystifying technology for your home or business" > > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com