Title: Using wordpress functions in custom php script
Last modified: August 19, 2016

---

# Using wordpress functions in custom php script

 *  Resolved [dsovino](https://wordpress.org/support/users/dsovino/)
 * (@dsovino)
 * [17 years ago](https://wordpress.org/support/topic/using-wordpress-functions-in-custom-php-script/)
 * Hello everyone. A brief description first:
 * I’m developing an as3 video player for a wp theme. In the theme, I’ve got a php
   script in a file that I use inside actionscript. This script generates a xml 
   file with metadata from a particular post (custom fields, category, etc).
 * Inside the player, I’m trying to add html text, in particular html links to the**
   _Categories_** where the post belongs to (did u get that?? :S).
 * To get all the above, I retrieve the data directly from the database. But, as
   you may expect, i can’t get the categories links html from there. I know i can
   generate this by hardcoding the url with the catID (which I already got) inside
   actionscript. I wonder though what would happen if my client wants to use permalinks.
 * I assume that the “get_category_link( $category_id )” function can get the job
   done, regardless if wp is using permalinks or not. So this is the deal:
 * Since my script doesn’t interact at all with wordpress (i get everything from
   mysql), i can’t call any wordpress funtion inside my script. What files would
   i have to include inside my php in order to get access to wp functions? Or should
   I just create some vars and write configure this by hand on my script??

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [17 years ago](https://wordpress.org/support/topic/using-wordpress-functions-in-custom-php-script/#post-1089113)
 * Ideas here may help:
 * [Integrating_WordPress_with_Your_Website](http://codex.wordpress.org/Integrating_WordPress_with_Your_Website)
 *  Thread Starter [dsovino](https://wordpress.org/support/users/dsovino/)
 * (@dsovino)
 * [17 years ago](https://wordpress.org/support/topic/using-wordpress-functions-in-custom-php-script/#post-1089143)
 * require_once(“../../../wp-blog-header.php”);
 * thanx a lot!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Using wordpress functions in custom php script’ is closed to new replies.

## Tags

 * [category](https://wordpress.org/support/topic-tag/category/)
 * [functions](https://wordpress.org/support/topic-tag/functions/)
 * [permalinks](https://wordpress.org/support/topic-tag/permalinks/)

 * 2 replies
 * 2 participants
 * Last reply from: [dsovino](https://wordpress.org/support/users/dsovino/)
 * Last activity: [17 years ago](https://wordpress.org/support/topic/using-wordpress-functions-in-custom-php-script/#post-1089143)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
