je viens vers vous car j’utilise généralement CURL en PHP pour alimenté ma base de donnée, mais depuis la MAJ de l’API cela ne fonctionne plus et je ne sais pas trop comment résoudre le problème.
Je récupéré sur la page d’un design, l’id, le titre, les tag, la description et l’image.
jusqu’à présent j’utilise CURL en php pour alimenter ma base de donnée avec les infos des designs.
J’ai un peut de mal car a chaque fois que cela ne fonctionne pas ça fait planté apache sur Linux, je doit redémarré a chaque essai.
Mais je vois pas comment adapter ton code, car je ne veux pas GET ou POST avec l’API mais je veux récupéré le code html d’une page comme celle ci par exemple “https://www.spreadshirt.fr/dj+hip+hop+mix-A13407398”.
Pour récupéré mes informations, Cela fonctionner très bien avant …
Comme on peut vendre des designs de tous les designs sur notre boutique, je navigue sur spreadshirt et des qu’un me plaît je l’ajoute a ma boutique avec un lien URL et non via un lien API.
////////////////
I have a bit of trouble because every time it does not work it crashed apache on Linux, I must restart at each test.
But I do not see how to adapt your code, because I do not want GET or POST with the API but I want to get the html code of a page like this for example “https://www.spreadshirt.fr/dj+hip+hop+mix-A13407398”
To retrieve my information, it will work fine before …
As we can sell designs of all the designs on our shop, I browse spreadshirt and as I like it I add it to my shop with a URL link and not via an API link.
I think your workflow is same like https://www.shirtrecycler.de right? If you click on a design, you will be redirected to the page with the tablomat, right?
Then you’ve got a list of designs with images. This would build your url to redirect to your tablomat page.
I think I have to create a wordpress plugin out of it, this would be much easier. This is what my wp-spreadplugin does, but with focus on products, not on designs.
Please let me know your website, so I can imagine your targets better.
But I use the designs of several accounts (to me and to other seller) which complicates things.
I tested the wordpress system some time ago but it is necessary to create the designs on my speadshirt account and it is very very long, my system allowed me to add a lot of designs quickly without going through my account spreadshirt.
here is my site tshirtfamily.fr but yes it’s a can the same system that the site you give me.
After it is shame because all my site walk properly but now spreadshirt no longer allow CURL visited these pages.
Maybe there are not many things added to my code.
ps: it’s a site that I have completely developed myself ‘from scratch’.
Regarding Basket, you see this extensions I made to your code above? You may also do that with your basket code. Otherwise send it to me in a private message and I’ll change it for you, so it will work again.
hello love tee so this morning I worked on the basket and thanks to your code on the site I managed to eliminate a lot of mistakes but I still have a problem and I do not understand why.
HTTP/1.1 400 Bad Request Content-Type: application/xml Content-Length: 165 Server: nginx/9.5 Cache-Control: private, no-cache, no-store Date: Tue, 20 Mar 2018 11:26:21 GMT Connection: close Access-Control-Max-Age: 86400 Access-Control-Allow-Credentials: false Access-Control-Allow-Headers: X-PINGOTHER,Origin,X-Requested-With,Content-Type,Accept Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS Access-Control-Allow-Origin: * X-Robots-Tag: noindex, nofollow X-Application: other HTTP 400 Bad Request-00001
I do not use sessionID in spreadshirt functions, maybe that’s it. I tried but it did not work I put a random number because I did not understand what it was necessary to add.
////////////////////////
I also tested the code for CURL to read the html but it did not work by adding the usér agent.
at // 7. Obtenir une URL de caisse you’re missing the user_agent.
curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
Please add it there too.
Funny thing, yesterday it worked from home. I could only imagine, some config problems on my working machine and not on my home one or something changed @ sprd from yesterday till today.
Anyway I’ll test today evening and let you know. Beside of that, you may really switch to api getting designs. It’s a lot easier, reliable and is working great.
Here’s how to retrieve marketplace designs: https://pastebin.com/mwi8C2KE
Funny thing, yesterday it worked from home. I could only imagine, some config problems on my working machine and not on my home one or something changed @ sprd from yesterday till today.
Anyway I’ll test today evening and let you know. Beside of that, you may really switch to api getting designs. It’s a lot easier, reliable and is working great.
Here’s how to retrieve marketplace designs: https://pastebin.com/mwi8C2KE2
yes you’re right I could maybe use the api, I just watched it could have worked.
The small problem is that I could not add a design of other sellers.
The big problem is that I have multiple accounts and this system only works on old account no?
Please add it there too.
On line 3 and 97 (https://pastebin.com/X7LDsuhD) I already put what you said, I did not put “ini_set (‘user_agent’, $ user_agent);” so I added it.
in the same 7 without user_agent I get to have the basket url. I added it anyway but it did not change anything
I tried with my user_agent and then with yours user_agent but it does not work I always have the same error.
Well, I should have mentioned, I am requesting the eu marketplace with the given id. So there are all designs listed of all sellers - which are published to marketplace. This is independent of any old/new account problems!
All Europe lol it’s thousands of design that. It will be hard to find those of my recent accounts inside.
I will look at this problem after, I have to get my basket to work first