http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html%23//apple_ref/occ/instm/NSString/writeToURL:atomically:encoding:error:

I'd guess that you could create an NSURL object with the full GET string, then 
write an empty string to that url. Something like this completely off-the-cuff 
code:

NSURL *url = [NSURL 
URLWithString:@"http://eric.domain.com/iOS_Log/logger.php?string=Foo";];
NSString *emptyString = @"";

[emptyString writeToURL:url atomically:NO encoding:NSUTF8StringEncoding 
error:NULL];


...come to think of it, since you're doing a GET you could probably just 
readFromURL and then discard the resulting NSString object. The point is 
basically that all of your data is going to be in the NSURL for the GET 
request, all you need to do is "touch" that URL via some method.



On Aug 4, 2011, at 9: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);
> ?>
> 
> 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.
> _______________________________________________
> 
> 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/joe.wollard%40gmail.com
> 
> This email sent to joe.woll...@gmail.com

_______________________________________________

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

Reply via email to