Member Avatar for sonicx2218

I have never used PHP before. I am familiar with HTML and Javascript, but never delved into PHP territory unfortunately. I'm stuck on a host that does not support PHP directly, but says if I host it on another site and embed it in the html it should work. The host I'm working with only allows html to be posted into an iframe. It's terrible, but I've got workarounds. So here am I trying to perform the action of retrieving data from a video using this tutorial and I'm lost.
http://www.packafoma.com/blog/2013/01/06/display-vimeo-play-counts-for-embedded-videos-without-slowing-down-your-site/
Doing what it says doesn't exactly work for me. I need to post this script to load javascript

<script src="https://dl.dropboxusercontent.com/u/177805367/mediaboxAdv.js" type="text/javascript"></script>

But I have no idea what to do for php..What different thing do I have to do to get the tutorial work for my situation?

Recommended Answers

All 7 Replies

nothing
if the remote host supports php you can simply iframe using the php file as the src href, and it will operate as expected.
If you have to have a second host, why not move the site to the second host and kill the useless one

<html><head>bla bla</head><body>
bla bla
<iframe src="       otherhost.com/filename.php">my host is useless</iframe> 
</body></html>

(src broken on purpose, do not want to post blind links)

Member Avatar for sonicx2218

Client wants to be able to edit the site and has no coding knowledge. Started making demands out the butt late in the development cycle.

Member Avatar for sonicx2218

And the php file activates like that? Thanks btw

Member Avatar for diafol

First of all, ditch that idea of embedding. If you're serious about dev'ing PHP, get with a host that supports it. Your host may be able to upgrade your account for a few extra quid. Not sure who you're with though as most hosts offer basic php/mysql dirt cheap.

Even before you consider that, install an Apache-MySQL-PHP system on your PC. A decent stack that I use can be found on XAMPP: http://www.apachefriends.org/en/xampp.html

You can even run it off a USB stick. :)

There are many different options to XAMPP though. These stacks are often particular to a platform and are known as WAMP (Windows), LAMP (Linux) or MAMP (Mac). 'WAMP' is also an alternative package to XAMPP, so the term seems to be used for a specific package and a type of package. :(

Have a play with it before you take the plunge and start cobbling all sorts of horribleness into your iframes.

not a problem, the remote site will process the php as it serves the file,

added to Diafol's wisdomn

from a prior post,

Proof read like a high school english teacher,
the client will make very many requests, document them all, the point at which they were made, the response, and how long accommodating them is scheduled to take, then does take

there are html/php scripts that allow the client to edit (prescribed portions) of the site without coding knowlege
the client does not need even to know that the host is different, his-site.com just resolves to a different host ip

When the client starts wanting an interactive site, one that supposrts scripting is an absolute necessity, they may find $4.95/month for one of the basic php sql hosts is worth it for the ease of incoporating all the available utility

good luck
php.net has good explanatory code snippets, and tutorials
there are hundreds of thousands of pre-written php scripts to do much of what the client will imagine
much of which is freeware, for you to incoporate in your code

dozens of freeware php-ide,
php thumbdrive software

$4.95/month, I have a couple of hundred sites running on netfirms, there are certain to be 1000 other hosts offering the same utility\
(I do not get a kickback from Netfirms)

Member Avatar for diafol

Seems I was writing my first reply when you guys were posting. :(

Client wants to be able to edit the site and has no coding knowledge. Started making demands out the butt late in the development cycle.

If you have an agreement, then the client can't change the goal posts like that. Be firm but fair. Anyway, seeing as you've got paying clients, you must have some experience in this field, what have you been using as back-end tech if not php?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.