Indiscriminate Music, PHP Development, Project Subaru, Vexed Daily

Final Post To This Blog

For those who have followed my few updates to this blog, it has been good chatting with you. As I have said in a recent post, I am no longer going to maintain this blog. I have opted to leave the “standard” blogging world for my new Photoblog, which I like because I don’t have to write anything.

I invite you all to come and look / comment if you like on my photos, my standard comedic rhetoric will only show itself in pictures and in comments.

http://www.vexedphoto.com

-Peace

PHP Development

Wordpress Proxy

So i was asked the other day about my installation of wordpress on my cash advance site, specifically how I went about getting a recent post list out of wordpress and onto the home page, when the home page of the site is not inside of wordpress.

Some quick background, my cash advance site (http://www.mycashdirect.com) is a combination of the Zend framework and WP.  The only portions of the site being run via WP is only /loan-articles/.

Back to the question…  Simple answer and i’m sure there are other ways of doing this, but it worked… Proxy via ajax or curl, your choice.

Mine happens to be curl because the function started out as something else and I was to lazy to switch it to ajax, which would be better and I’ll have to do that later…. any who

My Zend function that is called on the home page via a view:

class Library_View_Helper_RecentArticles
{
public $html = '';
public function recentArticles($limit=3)
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'http://www.mycashdirect.com/loan-articles/article-proxy/');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$this->html = curl_exec($curl);
curl_close($curl);
echo $this->html;
}
}

Pretty simple, yes it needs to be ajax…. I know…
On the Wordpress side, I create a page called proxy, and assign a template to that page called… proxy
that template looks contains a custom loop that only grabs the most recent three post and pushes it out to the page. You can actually see that page directly if you go here.

And that is about it, I get to use the native functionality of WP outside of WP. Sure, I could have written the homepage inside of WP, but that would have been to easy.

Vexed Daily

My Blogging Experience

This is one of 3 blogs that I have. Vexedmonkey is technically the only personal blog, one of the others is my cash advance blog and the 3rd is some social networking blog thing that I am not a big super fan of. I think they call it Facebook.

I dislike writing.

So I plan to change things up, in the near future this blog will go away, going to move to something a little less word intensive, not that I have kept this site updated often. But it’s a new year and with this new year I’m going to be doing things differently. I won’t bother you with the details, just a simple list:

  • I am not going to carry a wallet anymore.
  • I am consolidating my existing blogs into one wordless blog.
  • I plan to trust people even less than I already do.

PHP Development

Cash Advance Site Backonline

Well, mostly out of boredom I put my cash advance loan site back up.  Figured if I was going to have the domain may as well put something on it.  I am trying something different this time though, using WP for the backend and writing annoying amounts of cash advance and payday loan articles each week.  Who knows.. maybe I’ll get a hit and make a dollar or two. Cash Advance Online

Next »