This PHP script allows you to pull the number of signatures from an iPetitions Petition into valid XML to be used in a variety of ways.
Because iPetitions does not have an open API there is no way to programmatically access the number of signatures so it can be used elsewhere in your project or campaign. The use case for this is to dynamically incorporate the number of signatures into an existing layout and have control over formatting, layout, and color.
The script relies on iPetition's Widget which allows you to embed the signature number and button as an iFrame on a website.
To use this script place it and the simple_html_dom library on a web server with PHP and use the pid parameter to set your Petition's ID.
You can find this ID number from the Widget embed page on your iPetition site. (for example: http://www.ipetitions.com/widget/view/650884, the ID is '650884', so do '/petition.php?pid=650884')
The assumption will be made that you are using a valid ID number from iPetitions.
This script is not affiliated with iPetitions and can stop working at anytime.
brent20/iPetitions-XML
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Generates a valid XML feed of the number of signatures from an iPetition petition.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published