Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 18

Questions about using PHP code to interact with Stack Exchange and/or the Stack Exchange API. ... For general PHP questions, post on Stack Overflow instead.

2 votes
Accepted

Handling working of PHP API key on webpage

Anything transferred to the client and used by the client is inherently insecure. That being said, the API key can safely be divulged to the client. The only thing you need to protect is the client s …
Nathan Osman's user avatar
  • 23.3k
7 votes
0 answers
4k views

StackMail - Making the StackExchange Sites Accessible Via Email

Planned Obsolescence Due to almost negligible usage and ongoing maintenance issues, I would like to announce that the StackMail service will be shut down in a few days. Screenshot http …
Nathan Osman's user avatar
  • 23.3k
3 votes

StackCenter 2 - Now in Public Beta!

Introduction to writing widgets: Writing a widget is very simple and I'll begin by describing a simple example below. Start by logging in to your account or registering if you don't have one. Click …
Nathan Osman's user avatar
  • 23.3k
3 votes

StackCenter 2 - Now in Public Beta!

Using the wf_* functions in your code: Although the first example described the basic process of creating a widget and what is involved, I didn't go into any detail on how the widgets can interact wi …
Nathan Osman's user avatar
  • 23.3k
14 votes
3 answers
641 views

StackCenter 2 - Now in Public Beta!

Contact Email: [email protected] Code PHP (using the CakePHP framework), JavaScript, and of course, HTML …
Nathan Osman's user avatar
  • 23.3k
3 votes
0 answers
152 views

Stack Cartographer - A PHP tool for generating a JSON map of the Stack Exchange API.

This small PHP script downloads each page of the API docs (well, most of them anyway) and parses the HTML returned - scraping information about each method such as path, parameters, etc. … Code Stack Cartographer is written in PHP. The code can be retrieved from here: https://github.com/nathan-osman/Stack-Cartographer …
Nathan Osman's user avatar
  • 23.3k
3 votes
Accepted

Possible Gzip or data format problems when trying to read JSON.

Here is the relevant section of code from stack.PHP. $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_ENCODING,'gzip'); // Needed by API curl_setopt($ch,CURLOPT_RETURNT …
Nathan Osman's user avatar
  • 23.3k
32 votes
6 answers
7k views

Stack.PHP - Powerful and Extensive Library for Accessing the Stack Exchange API - Including ...

php // Imports all of the files we need require_once 'path_to_stackphp/api.php'; // Create a Site object for Stack Apps and get the questions tagged 'app' $stackapps = API::Site('stackapps'); $apps … PHP 5.2 or higher is required for most of the library. The SQLite driver for the cache class has a bug that prevents it from working in PHP 5.2, however. …
Nathan Osman's user avatar
  • 23.3k
7 votes
0 answers
136 views

StackAd Wordpress Plugin - Display Community Ads on Your WordPress Blog with Minimal Effort

Code Written in PHP and JavaScript. The code is available online at: https://github.com/nathan-osman/StackAd-WordPress-Plugin …
Nathan Osman's user avatar
  • 23.3k
20 votes
0 answers
2k views

OBSOLETE - StackImage - Generating Images of Questions and Users [Now with Global Flair!]

RIP June 23, 2010 - July 4, 2013 All of the features that StackImage provides are either available with the built-in flair on each Stack Exchange site or provided by StackImage's successor …
Nathan Osman's user avatar
  • 23.3k