473,503 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP Nightmare.....Integration into ebaY listings

Hi guys,

I've been searching all day for a method on how to integrate the
listings off ebaY onto my website, but I have had no joy whatsoever.

I want to be able to open a listing based on the the item number,
which I can do simply by using,

$ITEMNUMER = ("blah");
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=$ITEMNUMER

but, I cannot use include(); to achieve what I want to do, because
a) it is having trouble including external webpages
b) the ebaY listing is generated upon arrival, so theres no way it
could interperate it.

I've been trying all kinds of fopen(); techniques, but nothing seems
to be able to open the page, because (I assume) it doesn't exist till
an actual browser visits it, and it calls it values from the ebaY
database.

So, I tied using the ebaY API, but I'll need to pay a hellish amount
to use it, so it seems out the question.

What I really want to do is have a script check a listing for some
text. But, as I cannot get PHP to open the file, I'm stuck !

If anyone knows a way how I can strip some information out of an
external web page using PHP - it would be gladly appriciated.
Jul 17 '05 #1
11 2310
le*****@gmail.com (ben lessani) wrote in
news:53**************************@posting.google.c om:
Hi guys,

I've been searching all day for a method on how to integrate the
listings off ebaY onto my website, but I have had no joy whatsoever.

I want to be able to open a listing based on the the item number,
which I can do simply by using,

$ITEMNUMER = ("blah");
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=$ITEMNUMER

[...]

What I really want to do is have a script check a listing for some
text. But, as I cannot get PHP to open the file, I'm stuck !


<?php

$data = file_get_contents("http://cgi.ebay.co.uk/ws/eBayISAPI.dll?
ViewItem&item=4356967161");

if(preg_match("/potty/i", $data, $match)){
echo "This eBay listing says '$match[0]'";
}

?>

(Don't ask me, I searched eBay for "PHP" and that came up...)

hth
--

Bulworth : PHP/MySQL/Unix | Email : str_rot13('f@fung.arg');
--------------------------|---------------------------------
<http://www.phplabs.com/> | PHP scripts, webmaster resources
Jul 17 '05 #2
I tried that, and got...

Fatal error: Call to undefined function: file_get_contents() in
e:\phpdev\www\ebaytraders.com\test.php on line 12

Any more help ?
Thanks anyway, BTW
Senator Jay Billington Bulworth wrote:
le*****@gmail.com (ben lessani) wrote in
news:53**************************@posting.google.c om:
Hi guys,

I've been searching all day for a method on how to integrate the
listings off ebaY onto my website, but I have had no joy whatsoever.
I want to be able to open a listing based on the the item number,
which I can do simply by using,

$ITEMNUMER = ("blah");
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=$ITEMNUMER

[...]

What I really want to do is have a script check a listing for some
text. But, as I cannot get PHP to open the file, I'm stuck !


<?php

$data = file_get_contents("http://cgi.ebay.co.uk/ws/eBayISAPI.dll?
ViewItem&item=4356967161");

if(preg_match("/potty/i", $data, $match)){
echo "This eBay listing says '$match[0]'";
}

?>

(Don't ask me, I searched eBay for "PHP" and that came up...)

hth
--

Bulworth : PHP/MySQL/Unix | Email : str_rot13('f@fung.arg');
--------------------------|---------------------------------
<http://www.phplabs.com/> | PHP scripts, webmaster resources


Jul 17 '05 #3
le*****@gmail.com wrote in news:1108321417.931184.43170
@c13g2000cwb.googlegroups.com:
I tried that, and got...

Fatal error: Call to undefined function: file_get_contents() in
e:\phpdev\www\ebaytraders.com\test.php on line 12

Any more help ?


Which version of PHP are you using? If it's <4.3, this should work instead:

<?php

$data = join('', file("http://cgi.ebay.co.uk/ws/eBayISAPI.dll?
ViewItem&item=4356967161"));

if(preg_match("/potty/i", $data, $match)){
echo "This eBay listing contains '$match[0]'";
}

?>

hth
--
Bulworth : PHP/MySQL/Unix | Email : str_rot13('f@fung.arg');
--------------------------|---------------------------------
<http://www.phplabs.com/> | PHP scripts, webmaster resources
Jul 17 '05 #4
I now have the following errors. I did a quick check, and I am running
PHP version...4.2.3

Warning: file("
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=4356967161") -
Invalid argument in e:\phpdev\www\ebaytraders.com\test.php on line 14

Warning: Bad arguments to join() in
e:\phpdev\www\ebaytraders.com\test.php on line 14

Jul 17 '05 #5
ben
Okay, I've been running all my scripts on my local machine using phpDev
- which is probably what is causing me all these errors. I just created
a file with the following code onto an online webserver of mine, and it
worked straight away.

<?php
// Get a file into an array. In this example we'll go through HTTP to
get
// the HTML source of a URL.
$lines =
file('http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=4356967161/');

// Loop through our array, show HTML source as HTML source; and line
numbers too.
foreach ($lines as $line_num => $line) {
echo "Line #<b>{$line_num}</b> : " . htmlspecialchars($line) . "<br
/>\n";
}

// Another example, let's get a web page into a string. See also
file_get_contents().
$html = implode('',
file('http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=4356967161/'));
?>
Looks like I've set up PHP poorly on my machine, or the Proxy I'm
forced to use is blocking the pages.

Thanks very much for your help !

Ben

Jul 17 '05 #6
le*****@gmail.com wrote in news:1108322269.247069.179110
@z14g2000cwz.googlegroups.com:
I now have the following errors. I did a quick check, and I am running
PHP version...4.2.3

Warning: file("
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=4356967161") -
Invalid argument in e:\phpdev\www\ebaytraders.com\test.php on line 14

Warning: Bad arguments to join() in
e:\phpdev\www\ebaytraders.com\test.php on line 14


OK, it looks like you may not have the URL fopen() wrappers enabled.
Check your php.ini file for this setting:

allow_url_fopen = 1

Make sure it's set to 1. If it already is, I'm not sure what to suggest;
I'm not very familiar with PHP running under Windows.

hth
--
Bulworth : PHP/MySQL/Unix | Email : str_rot13('f@fung.arg');
--------------------------|---------------------------------
<http://www.phplabs.com/> | PHP scripts, webmaster resources
Jul 17 '05 #7
ben
It is turned on, but I suspect my proxy is causing it problems. I'll
try and stick to using my webhosting for this project.

I don't suppose you know of any webhosts that supply free MySQL and PHP
?

Ben

Jul 17 '05 #8
"ben" <le*****@gmail.com> wrote in news:1108323818.774983.143370
@z14g2000cwz.googlegroups.com:
It is turned on, but I suspect my proxy is causing it problems. I'll
try and stick to using my webhosting for this project.
Probably is something local, then - I just saw your other post re:
everything is working fine on your remote server.
I don't suppose you know of any webhosts that supply free MySQL and PHP
?


I'm not aware of any free hosts that support PHP/MySQL, but it's been
awhile since I looked into free hosts. I can suggest bluevirtual.com if
you're in the market for paid virtual hosting. No affiliation, just a
satisfied customer who followed the founders from their old employer,
where I'd been hosted since '98.

hth

--

Bulworth : PHP/MySQL/Unix | Email : str_rot13('f@fung.arg');
--------------------------|---------------------------------
<http://www.phplabs.com/> | PHP scripts, webmaster resources
--

Bulworth : PHP/MySQL/Unix | Email : str_rot13('f@fung.arg');
--------------------------|---------------------------------
<http://www.phplabs.com/> | PHP scripts, webmaster resources
Jul 17 '05 #9
For a free host, you can always host yourself.

"Senator Jay Billington Bulworth" <f@fung.arg> wrote in message
news:Xn*************************@65.24.7.50...
"ben" <le*****@gmail.com> wrote in news:1108323818.774983.143370
@z14g2000cwz.googlegroups.com:
It is turned on, but I suspect my proxy is causing it problems. I'll
try and stick to using my webhosting for this project.


Probably is something local, then - I just saw your other post re:
everything is working fine on your remote server.
I don't suppose you know of any webhosts that supply free MySQL and PHP
?


I'm not aware of any free hosts that support PHP/MySQL, but it's been
awhile since I looked into free hosts. I can suggest bluevirtual.com if
you're in the market for paid virtual hosting. No affiliation, just a
satisfied customer who followed the founders from their old employer,
where I'd been hosted since '98.

hth

--

Bulworth : PHP/MySQL/Unix | Email : str_rot13('f@fung.arg');
--------------------------|---------------------------------
<http://www.phplabs.com/> | PHP scripts, webmaster resources
--

Bulworth : PHP/MySQL/Unix | Email : str_rot13('f@fung.arg');
--------------------------|---------------------------------
<http://www.phplabs.com/> | PHP scripts, webmaster resources

Jul 17 '05 #10
ben
I am hosting myself......and thats how I've run into problems :P

Jul 17 '05 #11
ben
I found a good cheap host in the end.

http://www.geodetech.com/

ben

Jul 17 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1616
by: sam j | last post by:
Anyone know the best way to get page created in front page 2002 in an ebay listing. I've created a page but a lot of the format and graphics are missing when viewed in ebay Thanks Sam
37
4285
by: asj | last post by:
awhile back, eBay decided to switch from a Microsoft/.NET/Windows architecture on the backend to a J2EE one, which might explain why their java backend will handle up to 1 BILLION page views a day!...
2
1963
by: Bill | last post by:
I have looked up and down for a solution to this problem without any luck. I sell stuff on ebay. ebay will allow me to place javascript in my listings which I use to show a series of thumbnails of...
1
1425
by: LP | last post by:
Hello, I am thinking about developing an application on my own free time (web or maybe even windows client) that watches eBay listings, places last seconds winning bids, etc. I am sure someone has...
4
3964
by: VB Programmer | last post by:
Anyone know how to integrate an ASP.NET website with MLS (multiple listing service, used by realtors)? I want my site to display housing listings, etc... Thanks!
0
2361
by: eBay-Mitglied gret | last post by:
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD> <TABLE cellSpacing=0 cellPadding=2...
4
1095
by: Name Withheld | last post by:
OK i know this is a 101 question but... ASP.NET/VB.NET ListingItems() as string I need a nested array of Listings().ListingItems() so i can read a text file and split each line and insert...
7
1864
by: samatair | last post by:
I need to change an existing listings page with pagination. Each page shows 10 listings and they are ordered by the date they are added to the site. Now recently added listings show up in the...
1
4444
by: matz2k | last post by:
I've got a big problem with the CSS layout which I've produced with Photoshop/Dreamweaver especially for my ebay auctions. This is what it looks like...
0
7204
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7282
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7464
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5586
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5018
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3162
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1516
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
741
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
391
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.