Archive for the 'PHP Development' Category

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.

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

PHP Development

Logic done the long (wrong) way

This is stupid, just have faith, it’s stupid.

$init = substr($fxd,0,1);
if ($init == "1") { $init = 10; }

Next »