You already did! It is nice to hear thanks.
So, test that new version and let me know if you get new errors.
You already did! It is nice to hear thanks.
So, test that new version and let me know if you get new errors.
ok
Yeesssssssss!!! finally it works for me on my local server and that’s good enough.
only problorem is that dont work for other pages of aliexpress
Well, Nejah, the problem with pulling information from other sites is that they change as they wish.
What that means is that they may use different routines to display their data depending on various
display options. Therefore, it can be very hard to lock onto the exact image you want to pull out.
In my code I sent to you, I was working on only one page from their site. I also had the smaller image
by mistake. Here is a better version that loads the larger picture and displays it. Since you are planning
to use the images to sell their products, I do not think there is any copyright issues.
Also, note that with this code, you can pull just about anything you need from their catalog pages. But, in
most cases, you might have alter what you are looking for. This is done in the STRPOS areas. You will see
that to locate the larger image, I had to do it in two steps. First, locating the area where the image is
stored and then locating the actual string.
Good luck with your new business… Ernie
[php]
[/php]
One last thought, This is set up with a hard-coded $URL string that points at the page. You would want
to create some sort of routine to locate the item and then allow you to call this routine automatically.
Hi again
yes the script work graet with that URL but not for all URL and after a long search I discovered that:
----- “imageURL”: [ ----- is always before jpg file
----- US $----- is always before the total price.
that mean we have to take these 2 text in consideration to make the script work for all pages
see file in attachment
ali express full exemple.txt (54 KB)
Nejah,
This format is a bit different due to it being inside the Javascript code. This is where they show the
float-over zoom-in area on their site. So, the formatting is just a little different.
The following pulls both the picture and price from that area.
Hope that helps. Here is the new version:
[php]
[/php]
So, this version should work nicely for you. Hope it helps. If so, we can mark this one solved.
Of course, we look forward to your next question. Glad we could help…
Did that new version work for you? Just curious…
hi friend
Finally I understood you php magic !!
I made a page that pick up price and weight and another one to pick images and it work fine until now
[php]
$begin = strpos($page, ‘<dd class=“pnl-packaging-size” rel’) +32;
$begin2 = strpos($page, ‘=’ ,$begin) +2; // This item plus the length of it…
$end = strpos($page, “>”, $begin2) -1; // This item minus one for end of previous item…
$packing = substr($page, $begin2, $end-$begin2); // Place this text into <>‘s and it will display on site…
$packing=str_replace(’|’,’ cm* ',$packing);
echo “$packing cm”;
$begin = strpos($page, ‘pnl-packaging-weight" rel’) ;
$begin2 = strpos($page, ‘="’ ,$begin) +2; // This item plus the length of it…
$end = strpos($page, “>”, $begin2) -1; // This item minus one for end of previous item…
$weight = substr($page, $begin2, $end-$begin2); // Place this text into <>'s and it will display on site…
echo $weight;
[/php]
Thanks a lot my friend, you a genius
Congratulations on getting it to work. Glad I could help. Now go and make some money with it!
I will mark this one closed. When you run into another issue, please start a new post. Glad to meet you!
Thanks a lot, your forum is the best ever