• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Interfacing PHP with Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Interfacing PHP with Cocoa


  • Subject: Interfacing PHP with Cocoa
  • From: Francisco Tolmasky <email@hidden>
  • Date: Fri, 27 May 2005 11:12:08 -0700

I'm trying to interface php and Cocoa and I was wondering if someone could give me some ideas about how to go about doing it. Basically, I want a user to be able to open a php file in my program and then have my program feed it to some back-end php interpreting process, then get the resulting string (which should be html of course) and display it in a WebView. Also, which is probably going to be the most difficult part, is that I want certain variables in the php to be resolved at runtime by asking a data source in the Cocoa program. So, if you had something like CocoaGet("somevar"), it would go and ask your program. So basically, the Cocoa code would look like this:

[MyPhpDealie htmlStringForFile: @"file.php" dataSource: self];

//DataSource Function:

- (NSString *)PHPRequestsValueForVariable:(NSString *)variableName
{
    return [somePredifinedDictionary objectForKey: variableName];
}

Then, the php would be something like:

echo CocoaGet("some var");

Can anyone think of an easy way to do this without having to write an entire PHP interpreter myself?
Thanks in advance,


Francisco Tolmasky
email@hidden
www-scf.usc.edu/~tolmasky


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Interfacing PHP with Cocoa
      • From: Cameron Hayne <email@hidden>
    • Re: Interfacing PHP with Cocoa
      • From: Frederick Cheung <email@hidden>
  • Prev by Date: Re: How to get NSTableView to notice a change in NSTableDataModel
  • Next by Date: Re: How to get NSTableView to notice a change in NSTableDataModel
  • Previous by thread: NSApp nextEventMatchingMask Question
  • Next by thread: Re: Interfacing PHP with Cocoa
  • Index(es):
    • Date
    • Thread