Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicates when using yourls_add_new_link by including into own code #1045

Closed
ozh opened this issue Apr 6, 2013 · 0 comments
Closed

Duplicates when using yourls_add_new_link by including into own code #1045

ozh opened this issue Apr 6, 2013 · 0 comments

Comments

@ozh
Copy link
Member

ozh commented Apr 6, 2013

This is a COPY of Issue 1045: Duplicates when using yourls_add_new_link by including into own code, filed on Google Code before the project was moved on Github.

Please review the original issue and especially its comments. Comments here on closed issues will be ignored. Thanks.

Original description

Hello all,

I want to include YOURLS into a gallery and therefore created a really short test script to see how creating / showing short URLs works. The script is in the root of my YOURLS webspace and looks like this:

<?php
define('YOURLS_FLOOD_DELAY_SECONDS', 0);
define('YOURLS_UNIQUE_URLS', true);
include 'includes/load-yourls.php';
echo yourls_add_new_link('http://'.$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF'])
?>

When I run the script I get more then 10 short URLs in the YOURLS database. The long URL always is the same. The title somehow differs from try to try.

First I tried without the two define's, after the problems I added the two lines. No change in behaviour.

Is this because YOURLS itself tries to open the webpage to look for the title? But then it should not create another URL?

Hm...

Any help would be great. Thank you! :-)

Cheers,
Martin
@ozh ozh closed this as completed Apr 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant