Well, I have web host and I would like to get the code that shows my ebay feedback, but what I need is not a code that related for another website, what I mean is that I want to get my own code. I found very good code that can help me but still I need your help, here's the code and it works well:
<link rel="stylesheet" type="text/css" href="http://gamila-secret.comyr.com/Styles/feedback.css" />
<script type="text/javascript" src="http://www.pc-homecare.co.uk/ebay/feedback.php?id=[USERID]&site=[SITEID]&seller=[SELLER]"></script>
As I said I need my own code, what I did is getting the style file and rebuild it, but still I need to get the javascript file, I just went to that page "http://www.pc-homecare.co.uk/ebay/feedback.php?id=[USERID]&site=[SITEID]&seller=[SELLER]
" which I got from the code, and I copied its source(its codes), then I made a new file in my server with that code but unfortunately it did not worked.
Any ideas about how can I get the functions from the codes up to work on my own server?
You can use get_file_contents
in PHP like so to get the contents of a URL (see php.net/manual/en/function.file-get-contents.php).
<?php
$page = file_get_contents('http://www.example.com/');
?>
Or,
<?php
$section = file_get_contents('http://example.com', NULL, NULL, 20, 14);
var_dump($section);
?>
, to get a section of it. But of course you can always parse the contents of the URL from the first example using PHP regex (see http://php.net/manual/en/function.preg-match.php).
Echoing HTML is a simple matter in PHP (see php.net/manual/en/function.echo.php).
<?php
$src = 'http://example.com/script.js':
echo '<script src="' . $src . '"></script>';
?>
, using concatenation (see php.net/manual/en/language.operators.string.php).
I hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With