Jump to content

Creative Advice- php and asp coding??


katiemichelle

Recommended Posts

Here's the deal:
We started a small website and uploaded our forum first. It's up, works great...etc. It's in .asp Then we get someone to help us with the coding so that the top 12 topics in the forum post on our home page.

Now we've purchased a program for placing classified ads. This program has to be run on a linux server= php based.

To solve our problem the only way we knew how, we uploaded the classifieds to a different hosting prorgram on a linux server. Now my question- can any of you suggest or tell me if it's even possible,
a way to have my "featured classifieds" from my classifieds program (php) show up on my index page (asp)....OR....is it possible to write a php command that will pull the info needed from our forums that doesn't have to be in asp?

This stuff is brain surgery and i'm barely capable of putting on a bandaid. Is there any way to make these two "foreigners" talk to each other?

Maybe I should ad, we're very small budget. The classified ad software probably broke the bank. I'd be truly grateful to any suggestions. Please??????
Link to comment
Share on other sites

Have a look at AJAX.

This will allow you call script, get the output and place it in your page. The calling script can be ASP or PHP and the called script can also be either.

There's plenty to found by Googling "AJAX" or if you want a sample have a look at

[a href=\"http://members.aol.com/barryaandrew/xmlhttp/article.html\" target=\"_blank\"]my article/sample[/a]
Link to comment
Share on other sites

[!--quoteo(post=367551:date=Apr 22 2006, 06:50 PM:name=Barand)--][div class=\'quotetop\']QUOTE(Barand @ Apr 22 2006, 06:50 PM) [snapback]367551[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Have a look at AJAX.

This will allow you call script, get the output and place it in your page. The calling script can be ASP or PHP and the called script can also be either.

There's plenty to found by Googling "AJAX" or if you want a sample have a look at

[a href=\"http://members.aol.com/barryaandrew/xmlhttp/article.html\" target=\"_blank\"]my article/sample[/a]
[/quote]

Is this something that you might be interested in doing and providing us a quote for?
We have our host telling us we can't do it, another company saying that they can but it will take 4 weeks to get to and about $400.00...

I'll check into what you've suggested. I just lack any confidence at this point.

Thanks for the reply.
Link to comment
Share on other sites

[!--quoteo(post=367552:date=Apr 22 2006, 07:04 PM:name=katiemichelle)--][div class=\'quotetop\']QUOTE(katiemichelle @ Apr 22 2006, 07:04 PM) [snapback]367552[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Is this something that you might be interested in doing and providing us a quote for?
We have our host telling us we can't do it, another company saying that they can but it will take 4 weeks to get to and about $400.00...

I'll check into what you've suggested. I just lack any confidence at this point.

Thanks for the reply.
[/quote]

Here's a way you could do it in Ajax.

In the box where you want your featured classifieds to appear:
[code]
<DIV ID='classifiedsbox'></DIV>
<script LANGUAGE='javascript' TYPE='text/javascript'>
function createRequestObject() {
    var ro;
    var browser = navigator.appName;
    if (browser == "Microsoft Internet Explorer") {
        ro = new ActiveXObject("Microsoft.XMLHTTP");
    } else {
        ro = new XMLHttpRequest();
    }
    return ro;

}

var http = createRequestObject();
function sndReq(divID) {
    http.open("GET",'  (this is the full URL reference to your Php file) ' );
    http.onreadystatechange = function() {
        if (http.readyState==4) {
            document.getElementById(divID).innerHTML = http.responseText;
        }
    };
    http.send(null);
}
sndreq('classifiedsbox');
</SCRIPT>
[/code]

You would probably have to make a special file to display just the list of "featured" classifieds.

I know zero about ASP, but doesn't it have an include function, the same as PHP? I know that PHP includes can be text or HTML or whatever, I would thnk ASP would be the same way.




Link to comment
Share on other sites

I'm not sure why people are suggesting AJAX as an answer. Using AJAX would limit you to the clients who have javascript turned on.

Rather than preforming some quick fix, I would suggest having someone look into the reason why you need to run two servers for your website. Have them see why it is the classified ad script must be run on a linux server. Have them look into what type of database and method of access each application uses. If you wish to stay with these two scripts, perhaps hire someone to translate on script into the language of the other for compatibility. However, updates from the product vendor would then need to be translated if you wanted to install the updates.

Perhaps I do not provide the easy, simple answers. For the level of customization you seem to be wanting on your site, I would suggest contracting someone to make sure that the job is done right. Being able to keep your website on one central server may just save you money after all.
Link to comment
Share on other sites

[!--quoteo(post=367647:date=Apr 23 2006, 10:27 AM:name=skhale)--][div class=\'quotetop\']QUOTE(skhale @ Apr 23 2006, 10:27 AM) [snapback]367647[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I'm not sure why people are suggesting AJAX as an answer. Using AJAX would limit you to the clients who have javascript turned on.
[/quote]

i actually agree with skhale on this one to a big extent.

there are also actually plenty of php based forums that you could use (phpbb, invision, etc) that would save you the trouble of trying to use two totally different technologies at the same time. i dont know what i'd think if i noticed a sites pages being fed to me in a mixture of php and asp.

at the end of the day, if i've got you correctly, all we're talking about is showing the top forum posts on your front page. in this case, if you really do wanna keep a mixture of php and asp, the issue of the two languages 'talking' to eachother doesnt really even come into it. depending on the database technology your forum uses, it's just a matter of putting together a php script or two that will read directly from this database and output the results.

apologies if i've missed the point, it just seems like a fairly simple workaround.
Link to comment
Share on other sites

[!--quoteo(post=367654:date=Apr 23 2006, 06:11 AM:name=redbullmarky)--][div class=\'quotetop\']QUOTE(redbullmarky @ Apr 23 2006, 06:11 AM) [snapback]367654[/snapback][/div][div class=\'quotemain\'][!--quotec--]
i actually agree with skhale on this one to a big extent.

there are also actually plenty of php based forums that you could use (phpbb, invision, etc) that would save you the trouble of trying to use two totally different technologies at the same time. i dont know what i'd think if i noticed a sites pages being fed to me in a mixture of php and asp.

at the end of the day, if i've got you correctly, all we're talking about is showing the top forum posts on your front page. in this case, if you really do wanna keep a mixture of php and asp, the issue of the two languages 'talking' to eachother doesnt really even come into it. depending on the database technology your forum uses, it's just a matter of putting together a php script or two that will read directly from this database and output the results.

apologies if i've missed the point, it just seems like a fairly simple workaround.
[/quote]

Thanks for the replies. I would like to keep the forum because our traffic is used to it and you know how people are about change.

I'm fine with keeping them on two servers, but really wanted the "top ads" to show up on my homepage which is hosted on the windows server, written in asp. Wouldn't this just work like an "includes" and is it possible to pull the top ads from one site to show up on the other?

If you know anyone that I might be able to contract for this- let me know. I'd love to get a quote and time frame!!

Thanks again,
K
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.