Title: [plugin: ProPlayer] calling player through PHP
Last modified: August 19, 2016

---

# [plugin: ProPlayer] calling player through PHP

 *  Resolved [gerben-van-eijk](https://wordpress.org/support/users/gerben-van-eijk/)
 * (@gerben-van-eijk)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/plugin-proplayer-calling-player-through-php/)
 * Hello there,
 * I am using the proplayer plugin to show video files from various players such
   as youtube and vimeo. the plugin works great when I add it in a post.
 * However I have some of my own videos aswel for which I’d like to generate pages.
   I have everything set up for it, as in I can retrieve the url data from a database
   ready to be inserted wherever it needs to go.
 * The problem is that I can’t seem to call the ProPlayer through php. On the website
   for the ProPlayer plugin the author said it had to be done like this:
 *     ```
       <?php
       		$player = new ProPlayer();
       		$player->buildPlayer("[pro-player]urlforvideo[/pro-player]");
       		?>
       ```
   
 * However, when I use that it doesn’t do a thing, when I check the source it’s 
   like it doesn’t generate any html or javascript whatsoever.
 * Does anyone know what I’d need to add or change to make it work?

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

 *  Thread Starter [gerben-van-eijk](https://wordpress.org/support/users/gerben-van-eijk/)
 * (@gerben-van-eijk)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/plugin-proplayer-calling-player-through-php/#post-1070410)
 * Shameless bump.. anyone?
 *  [supermag](https://wordpress.org/support/users/supermag/)
 * (@supermag)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/plugin-proplayer-calling-player-through-php/#post-1070414)
 * you should tell that to the main owner in his site.
 * [http://isagoksu.com/proplayer-wordpress-plugin/](http://isagoksu.com/proplayer-wordpress-plugin/)
 *  Thread Starter [gerben-van-eijk](https://wordpress.org/support/users/gerben-van-eijk/)
 * (@gerben-van-eijk)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/plugin-proplayer-calling-player-through-php/#post-1070435)
 * Well I did, but I´ve not received an answer yet and until then I am quite stuck..
   so I just figured I´d broaden the search for an answer a bit and ask it on here
   aswel.
 *  [isa.goksu](https://wordpress.org/support/users/isagoksu/)
 * (@isagoksu)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/plugin-proplayer-calling-player-through-php/#post-1070436)
 * [@gerben](https://wordpress.org/support/users/gerben/), I’m pretty busy in these
   days. Very quick answer to ur q is:
 * buildPlayer is a function that parses the array of entries. Instead you should
   use addPlayerCode method to return something back. But I’ve never tried with 
   that way. So I’m not sure. Just try and let us know please.
 * Thanks,
    Isa
 *  Thread Starter [gerben-van-eijk](https://wordpress.org/support/users/gerben-van-eijk/)
 * (@gerben-van-eijk)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/plugin-proplayer-calling-player-through-php/#post-1070444)
 * Thanks for the reply Isa, I will play around with it and see if I can get it 
   to work.
 * As to you being pretty busy, being busy usually means things are going well, 
   so keep it up!
 *  Thread Starter [gerben-van-eijk](https://wordpress.org/support/users/gerben-van-eijk/)
 * (@gerben-van-eijk)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/plugin-proplayer-calling-player-through-php/#post-1070446)
 * Okay I’ve got it working.
    It didn’t work right of the bat so I did some debugging
   with echo’s in the proplayer.php file to see how far it was getting. But it turns
   out that for some reason unknown to me at least. it is not actually returning
   the return from the addPlayerCode function.
 * So what I did to solve it is simply echo what it returns which was the $content.
 * so just above the
    return $content; I wrote echo $content; The problem it then
   gave is that if I put a video in a post like you normally would, it would show
   up twice, but I simply fixed that with an if statement to only use the echo when
   you are on one of the gallery pages and if you’re not on the gallery page it 
   will simply use the return.
 *  [prodigy2m](https://wordpress.org/support/users/prodigy2m/)
 * (@prodigy2m)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-proplayer-calling-player-through-php/#post-1070530)
 * Gerben van Eijk,
 * Can you please paste the whole code that calls the function to pro-player from
   outside of the content (php). Whatever I do, nothing works. I tried everything,
   plus I am new to PHP. Thank you in advance. My e-mail is [igordesigns@gmail.com](https://wordpress.org/support/topic/plugin-proplayer-calling-player-through-php/igordesigns@gmail.com?output_format=md).
 * Thanks,
    Igor M [igordesigns@gmail.com](https://wordpress.org/support/topic/plugin-proplayer-calling-player-through-php/igordesigns@gmail.com?output_format=md)
 *  [isa.goksu](https://wordpress.org/support/users/isagoksu/)
 * (@isagoksu)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/plugin-proplayer-calling-player-through-php/#post-1070537)
 * [@prodigy2m](https://wordpress.org/support/users/prodigy2m/), just look at the
   new version. There is a new feature that supports shortcode use.

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

The topic ‘[plugin: ProPlayer] calling player through PHP’ is closed to new replies.

## Tags

 * [generate](https://wordpress.org/support/topic-tag/generate/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 8 replies
 * 4 participants
 * Last reply from: [isa.goksu](https://wordpress.org/support/users/isagoksu/)
 * Last activity: [16 years, 8 months ago](https://wordpress.org/support/topic/plugin-proplayer-calling-player-through-php/#post-1070537)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
