$page = implode ('', file ("http://examplesite/index.cgi?prod_id=" .$product_sku. ";vendor=" .$mf_name. ";shopname=url;lang=UK"));
$mysite = $_SERVER['PHP_SELF'].'?link='; // request this page
$page = preg_replace("/<a href=\"(.*)\">/i", "<a href=\"$mysite\\1\">", $page);
echo $page;

Now i can't find a way to get this work.
I need product_sku and mf_name to be collected from a joomla vm site and implode this external link into my joomla vm site.

Any help?

Recommended Answers

All 2 Replies

Why are you using file , just use file_get_contents which doesn't split by newline

I don't know much about coding and i found this peace of code on the internet for external pages to load on your site.

The code is working fine for oscommerce shops. But i was wundering if someone can help me out to change the code so it will work in joomla virtuemart.

I'm looking for the right code to extract
product sku $product_sku and
manufacturer name $mf_name

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.