473,406 Members | 2,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Dear Sir I am a php developer and i am facing some problem regarding web scaraping.

Expand|Select|Wrap|Line Numbers
  1. <?php 
  2. $file_string = file_get_contents('http://delhi.tradus.com/puma-axis-ii-ind-silver-lime-green-sports-shoes/p/FTWN4FH29KD29I2T?tag=19622&tsrc=TagListing');
  3. preg_match('#<span itemprop="priceCurrency" class="rupee">(.*)<\/span><span itemprop="(.*?)">(.*)<\/span>#', $file_string, $price);
  4. echo '<pre>';
  5. print_r($price);
  6. echo $price_out = $price[0];
  7.  
  8. ?>
//Note: This code i am using for fetching the price from tradus.com shopping website its work but it is picking wrong price from website. I had created lot of preg_match pattern but it fails so please provide me exact solution regarding this
May 9 '14 #1
2 1347
Luuk
1,047 Expert 1GB
The exact solution would be to contact the site owner, and ask him to send you the complete list of prices.....
May 10 '14 #2
Dear Luuk
Thank you for your response but i want to fetch price from using web scraping code. I had fetched price from above 30 websites but in tradus.com.it doesn't work.
May 13 '14 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Shreyas Kulkarni | last post by:
hi there, recently i have got a problem regarding calculation of sum of digits in a floating point or precision number. the weird behaviour of compiler/language is preventing me from calculating...
22
by: Rajshekhar | last post by:
Hi , i am writing a simple prgm to read a .txt file then store the contents into the array... program as follows: -------------------------- #include<stdio.h> int main() { FILE *fp1;
2
by: Vijendra | last post by:
Hello friends i am facing problem in using icons in toolbar of 256 color or higher in VC++. can any body tell me whats the solution for this problem specialy when my OS is Windows 2000 server.
6
by: ashokfig | last post by:
Hi All, I'm facing problem regarding Accessing secure web page. I tried to connect page through progamming & want access data from web page. I passed Login credentials & also certificate which...
18
by: Vijaykumar Dave | last post by:
I have a program for base X power N as under. The problem is that when the range specified in loop is given it works well, but when any character is pressed, it goes to infinite loop. Second...
0
by: mahesh123 | last post by:
Hi, I am new to use the crystal reports8.0. I am facing the problem regarding the database connection through the ADO Connection. Suppose my database name is "sample.pra"(due to some security...
3
by: yassinsearch | last post by:
Hi , I am facing problem text direction.(for HEBREW lanaguage) By default the direction of text field is Left to Rignt. Any SRW methods is available to set the reading direction from Right to...
2
by: RajSharma | last post by:
Hi, I am facing a problem regarding querying thru a large table having millions of rows....... Its hanging in between while querying for all those rows Can anybody suggest me a query regarding :...
2
by: apoorva.groups | last post by:
Hi I am facing problem while using regexec function. Ex: String = "abc_def_hig" sub string = "def" regexc if I use regexec the it will find the sub string in string and it will return 0....
0
by: Dhananjay | last post by:
hi all, I am facing problem in programming.Can anybody please let me know how to solve the problem. I have a link, clicking the link opens a page in which there are some data which is coming from...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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
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...

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.