Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MetaGer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
MetaGer
Commits
b46708cb
Commit
b46708cb
authored
4 years ago
by
Dominik Hebeler
Browse files
Options
Downloads
Plain Diff
Merge branch '1085-sometimes-all-results-are-marked-as-affiliates' into 'development'
Resolve "Sometimes all results are marked as Affiliates" Closes
#1085
See merge request
!1794
parents
0c5361a4
bea6ddbc
No related branches found
Branches containing commit
No related tags found
3 merge requests
!1895
Development
,
!1797
Development
,
!1794
Resolve "Sometimes all results are marked as Affiliates"
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/Console/Commands/RequestFetcher.php
+4
-2
4 additions, 2 deletions
app/Console/Commands/RequestFetcher.php
app/Models/Adgoal.php
+12
-1
12 additions, 1 deletion
app/Models/Adgoal.php
with
16 additions
and
3 deletions
app/Console/Commands/RequestFetcher.php
+
4
−
2
View file @
b46708cb
...
@@ -202,9 +202,11 @@ class RequestFetcher extends Command
...
@@ -202,9 +202,11 @@ class RequestFetcher extends Command
curl_setopt_array
(
$ch
,
$job
[
"curlopts"
]);
curl_setopt_array
(
$ch
,
$job
[
"curlopts"
]);
}
}
if
(
!
empty
(
$this
->
proxyhost
)
&&
!
empty
(
$this
->
proxyport
)
&&
!
empty
(
$this
->
proxyuser
)
&&
!
empty
(
$this
->
proxypassword
)
)
{
if
(
!
empty
(
$this
->
proxyhost
)
&&
!
empty
(
$this
->
proxyport
))
{
curl_setopt
(
$ch
,
CURLOPT_PROXY
,
$this
->
proxyhost
);
curl_setopt
(
$ch
,
CURLOPT_PROXY
,
$this
->
proxyhost
);
curl_setopt
(
$ch
,
CURLOPT_PROXYUSERPWD
,
$this
->
proxyuser
.
":"
.
$this
->
proxypassword
);
if
(
!
empty
(
$this
->
proxyuser
)
&&
!
empty
(
$this
->
proxypassword
)){
curl_setopt
(
$ch
,
CURLOPT_PROXYUSERPWD
,
$this
->
proxyuser
.
":"
.
$this
->
proxypassword
);
}
curl_setopt
(
$ch
,
CURLOPT_PROXYPORT
,
$this
->
proxyport
);
curl_setopt
(
$ch
,
CURLOPT_PROXYPORT
,
$this
->
proxyport
);
curl_setopt
(
$ch
,
CURLOPT_PROXYTYPE
,
CURLPROXY_HTTP
);
curl_setopt
(
$ch
,
CURLOPT_PROXYTYPE
,
CURLPROXY_HTTP
);
}
}
...
...
This diff is collapsed.
Click to expand it.
app/Models/Adgoal.php
+
12
−
1
View file @
b46708cb
...
@@ -130,10 +130,21 @@ class Adgoal
...
@@ -130,10 +130,21 @@ class Adgoal
try
{
try
{
$answer
=
json_decode
(
$answer
,
true
);
$answer
=
json_decode
(
$answer
,
true
);
foreach
(
$answer
as
$partnershop
)
{
foreach
(
$answer
as
$partnershop
)
{
$targetUrl
=
$partnershop
[
"url"
];
$targetUrl
=
$partnershop
[
"url"
];
$tld
=
$partnershop
[
"tld"
];
$targetHost
=
parse_url
(
$targetUrl
,
PHP_URL_HOST
);
/*
Adgoal sometimes returns affiliate Links for every URL
That's why we check if the corresponding TLD matches the orginial URL
*/
if
(
$targetHost
!==
false
&&
stripos
(
$targetHost
,
$tld
)
===
false
){
continue
;
}
foreach
(
$results
as
$result
)
{
foreach
(
$results
as
$result
)
{
if
(
$result
->
link
===
$targetUrl
&&
!
$result
->
partnershop
)
{
if
(
$result
->
link
===
$targetUrl
&&
!
$result
->
partnershop
)
{
# Ein Advertiser gefunden
# Ein Advertiser gefunden
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment