Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
MetaGer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
55
Issues
55
List
Boards
Labels
Service Desk
Milestones
Merge Requests
7
Merge Requests
7
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
open-source
MetaGer
Commits
bea6ddbc
Commit
bea6ddbc
authored
Jan 06, 2021
by
Dominik Hebeler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added a check to verify affiliate links
parent
cac6d419
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
app/Models/Adgoal.php
app/Models/Adgoal.php
+12
-1
No files found.
app/Models/Adgoal.php
View file @
bea6ddbc
...
...
@@ -130,10 +130,21 @@ class Adgoal
try
{
$answer
=
json_decode
(
$answer
,
true
);
foreach
(
$answer
as
$partnershop
)
{
$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
)
{
if
(
$result
->
link
===
$targetUrl
&&
!
$result
->
partnershop
)
{
# Ein Advertiser gefunden
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment