Skip to content
WJunction - Webmaster Forum

Find and Delete SQL Server database Wordpress

Status
Not open for further replies.
hello i have a wordpress and a dooplay theme.. and i want to delete all my old link
openload.co and verystream.com on my wordpress site database or .sql anybody knows to do that and explain what is right method
not on manual thing.. just the code or command may be plugin..
 

9 comments

ask the owner his insight to this

since the embed link are formatted using json u should look into how to update them using JSON_SET() in mysql
 
Last edited:
i just check its not json, it similar but its not.

@jounin89

i suggest u try to use wp_query to get ids of all post that have openload
then use those post ids to remove openload and use wp_update_post()
the data is store in meta_input -> "repeatable_fields"
you can automate it using cron.
 
Last edited:
this script checks your movies-posts and remove player links with openload.co or verystream.com
make a backup and try it in a test enviroment before. work at my tests
i addet this script at wp-content\themes\dooplay\header.php and open the Main page, but this is a very dirty way to run the script, maybe you php config disallow this because of long runtime or memory use


PHP:
echo "START MOVIE EDIT<br>";
$loop = new WP_Query( $array('post_type' => 'movies' ); );

while ( $loop->have_posts() ) : $loop->the_post();

    global $post;
    $repeatable_fields = get_post_meta( $post->ID, 'repeatable_fields' );

    $data_array_tmp = array();        
    $found_bad_url = false;
    foreach ( $repeatable_fields[0]  as $stream_link_object) {
                
        if(strpos ( $stream_link_object["url"] , "openload.co" ) !== false || strpos (  $stream_link_object["url"] , "verystream.com") !== false){
            $found_bad_url = true;
        }else{
            array_push ( $data_array_tmp , $stream_link_object);
        }
        
        if(    $found_bad_url){
            update_post_meta($post->ID, 'repeatable_fields',$data_array_tmp );
        }
    }
endwhile;
echo "FINISH MOVIE EDIT<br>";
exit
Post automatically merged:

damn, did not test las tchanged, current version :

PHP:
echo "START MOVIE EDIT<br>";
$loop = new WP_Query( array('post_type' => 'movies' ) );

while ( $loop->have_posts() ) : $loop->the_post();

    global $post;
    $repeatable_fields = get_post_meta( $post->ID, 'repeatable_fields' );

    $data_array_tmp = array();       
    $found_bad_url = false;
    foreach ( $repeatable_fields[0]  as $stream_link_object) {
                
        if(strpos ( $stream_link_object["url"] , "openload.co" ) !== false || strpos (  $stream_link_object["url"] , "verystream.com") !== false){
            $found_bad_url = true;
        }else{
            array_push ( $data_array_tmp , $stream_link_object);
        }
        
        if(    $found_bad_url){
            update_post_meta($post->ID, 'repeatable_fields',$data_array_tmp );
        }
    }
endwhile;
echo "FINISH MOVIE EDIT<br>";
exit
Post automatically merged:

and again, dont drink and code

PHP:
echo "START MOVIE EDIT<br>";
$loop = new WP_Query( array('post_type' => 'movies' ) );

while ( $loop->have_posts() ) : $loop->the_post();

    global $post;
    $repeatable_fields = get_post_meta( $post->ID, 'repeatable_fields' );

    $data_array_tmp = array();       
    $found_bad_url = false;
    foreach ( $repeatable_fields[0]  as $stream_link_object) {
                
        if(strpos ( $stream_link_object["url"] , "openload.co" ) !== false || strpos (  $stream_link_object["url"] , "verystream.com") !== false){
            $found_bad_url = true;
        }else{
            array_push ( $data_array_tmp , $stream_link_object);
        }
    }
    
    if(    $found_bad_url){
        update_post_meta($post->ID, 'repeatable_fields',$data_array_tmp );
    }
endwhile;
echo "FINISH MOVIE EDIT<br>";
exit
 
Last edited:
hey dude, dont explain me how to do the job.

if you are unable to do the basics i cant and will help you.
without explaining what you try, which error you have and things like this you will not solve your problem
have fun with manuel deleting the entrys
 
Status
Not open for further replies.

About the author

J
Active Member · Joined
356
Messages
54
Reactions
28
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom